!function(a){"use strict";function b(a){l(function(){throw a})}function c(b){return this.then(b,a)}function d(b){return this.then(a,b)}function e(b,c){return this.then(function(a){return m(b)?b.apply(null,n(a)?a:[a]):v.onlyFuncs?a:b},c||a)}function f(a){function b(){a()}return this.then(b,b),this}function g(a){return this.then(function(b){return m(a)?a.apply(null,n(b)?b.splice(0,0,void 0)&&b:[void 0,b]):v.onlyFuncs?b:a},function(b){return a(b)})}function h(c){return this.then(a,c?function(a){throw c(a),a}:b)}function i(a,b){var c=q(a);if(1===c.length&&n(c[0])){if(!c[0].length)return v.fulfilled([]);c=c[0]}var d=[],e=v(),f=c.length;if(f)for(var g=function(a){c[a]=v.promisify(c[a]),c[a].then(function(g){d[a]=b?c[a]:g,--f||e.resolve(d)},function(g){b?(d[a]=c[a],--f||e.resolve(d)):e.reject(g)})},h=0,i=f;i>h;h++)g(h);else e.resolve(d);return e.promise}function j(a,b){return a.then(m(b)?b:function(){return b})}function k(a){var b=q(a);1===b.length&&n(b[0])&&(b=b[0]);for(var c=v(),d=0,e=b.length,f=v.resolved();e>d;d++)f=j(f,b[d]);return c.resolve(f),c.promise}var l,m=function(a){return"function"==typeof a},n=function(a){return Array.isArray?Array.isArray(a):a instanceof Array},o=function(a){return!(!a||!(typeof a).match(/function|object/))},p=function(b){return b===!1||b===a||null===b},q=function(a,b){return[].slice.call(a,b)},r="undefined",s=typeof TypeError===r?Error:TypeError;if(typeof process!==r&&process.nextTick)l=process.nextTick;else if(typeof MessageChannel!==r){var t=new MessageChannel,u=[];t.port1.onmessage=function(){u.length&&u.shift()()},l=function(a){u.push(a),t.port2.postMessage(0)}}else l=function(a){setTimeout(a,0)};var v=function(b){function i(){if(0!==r){var a,b=t,c=0,d=b.length,e=~r?0:1;for(t=[];d>c;c++)(a=b[c][e])&&a(n)}}function j(a){function b(a){return function(b){return c?void 0:(c=!0,a(b))}}var c=!1;if(r)return this;try{var d=o(a)&&a.then;if(m(d)){if(a===u)throw new s("Promise can't resolve itself");return d.call(a,b(j),b(k)),this}}catch(e){return b(k)(e),this}return q(function(){n=a,r=1,i()}),this}function k(a){return r||q(function(){try{throw a}catch(b){n=b}r=-1,i()}),this}var n,q=(a!==b?b:v.alwaysAsync)?l:function(a){a()},r=0,t=[],u={then:function(a,b){var c=v();return t.push([function(b){try{p(a)?c.resolve(b):c.resolve(m(a)?a(b):v.onlyFuncs?b:a)}catch(d){c.reject(d)}},function(a){if((p(b)||!m(b)&&v.onlyFuncs)&&c.reject(a),b)try{c.resolve(m(b)?b(a):b)}catch(d){c.reject(d)}}]),0!==r&&q(i),c.promise},success:c,error:d,otherwise:d,apply:e,spread:e,ensure:f,nodify:g,rethrow:h,isPending:function(){return 0===r},getStatus:function(){return r}};return u.toSource=u.toString=u.valueOf=function(){return n===a?this:n},{promise:u,resolve:j,fulfill:j,reject:k}};if(v.deferred=v.defer=v,v.nextTick=l,v.alwaysAsync=!0,v.onlyFuncs=!0,v.resolve=v.resolved=v.fulfilled=function(a){return v(!0).resolve(a).promise},v.reject=v.rejected=function(a){return v(!0).reject(a).promise},v.wait=function(a){var b=v();return setTimeout(b.resolve,a||0),b.promise},v.delay=function(a,b){var c=v();return setTimeout(function(){try{c.resolve(m(a)?a.apply(null):a)}catch(b){c.reject(b)}},b||0),c.promise},v.promisify=function(a){return a&&m(a.then)?a:v.resolved(a)},v.all=function(){return i(arguments,!1)},v.resolveAll=function(){return i(arguments,!0)},v.sequence=function(){return k(arguments)},v.nodeCapsule=function(a,b){return b||(b=a,a=void 0),function(){var c=v(),d=q(arguments);d.push(function(a,b){a?c.reject(a):c.resolve(arguments.length>2?q(arguments,1):b)});try{b.apply(a,d)}catch(e){c.reject(e)}return c.promise}},"function"==typeof define&&define.amd)define("D.js",[],function(){return v});else if(typeof module!==r&&module.exports)module.exports=v;else if(typeof window!==r){var w=window.D;v.noConflict=function(){return window.D=w,v},window.D=v}}(); !function(){"use strict";function e(n,t,r){return("string"==typeof t?t:t.toString()).replace(n.define||a,function(e,t,o,a){return 0===t.indexOf("def.")&&(t=t.substring(4)),t in r||(":"===o?(n.defineParams&&a.replace(n.defineParams,function(e,n,o){r[t]={arg:n,text:o}}),t in r||(r[t]=a)):new Function("def","def['"+t+"']="+a)(r)),""}).replace(n.use||a,function(t,o){n.useParams&&(o=o.replace(n.useParams,function(e,n,t,o){if(r[t]&&r[t].arg&&o){var a=(t+":"+o).replace(/'|\\/g,"_");return r.__exp=r.__exp||{},r.__exp[a]=r[t].text.replace(new RegExp("(^|[^\\w$])"+r[t].arg+"([^\\w$])","g"),"$1"+o+"$2"),n+"def.__exp['"+a+"']"}}));var a=new Function("def","return "+o)(r);return a?e(n,a,r):a})}function n(e){return e.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var t,r={engine:"doT",version:"1.1.1",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0,log:!0};r.encodeHTMLSource=function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},t=e?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(e){return e?e.toString().replace(t,function(e){return n[e]||e}):""}},t=function(){return this||(0,eval)("this")}(),"undefined"!=typeof module&&module.exports?module.exports=r:"function"==typeof define&&define.amd?define(function(){return r}):t.doT=r;var o={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},a=/$^/;r.template=function(c,i,u){i=i||r.templateSettings;var d,s,p=i.append?o.append:o.split,l=0,f=i.use||i.define?e(i,c,u||{}):c;f=("var out='"+(i.strip?f.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):f).replace(/'|\\/g,"\\$&").replace(i.interpolate||a,function(e,t){return p.start+n(t)+p.end}).replace(i.encode||a,function(e,t){return d=!0,p.startencode+n(t)+p.end}).replace(i.conditional||a,function(e,t,r){return t?r?"';}else if("+n(r)+"){out+='":"';}else{out+='":r?"';if("+n(r)+"){out+='":"';}out+='"}).replace(i.iterate||a,function(e,t,r,o){return t?(l+=1,s=o||"i"+l,t=n(t),"';var arr"+l+"="+t+";if(arr"+l+"){var "+r+","+s+"=-1,l"+l+"=arr"+l+".length-1;while("+s+"b;b++)if(e=this.__events[a][b],"object"==typeof e?e.handleEvent(g):e.apply(this,f),g.isPropagationStopped())return g;if(this.__once&&a in this.__once){for(b=0,d=this.__once[a].length;d>b;b++)if(e=this.__once[a][b],"object"==typeof e?e.handleEvent(g):e.apply(this,f),g.isPropagationStopped())return delete this.__once[a],g;delete this.__once[a]}return g},change:function(a,b){var d,e,f,g=Array.prototype.slice.call(arguments,1),h=new c.Event(a,g);if(g.push(h),this.__events&&a in this.__events)for(d=0,e=this.__events[a].length;e>d;d++)if(g[0]=b,f=this.__events[a][d],b="object"==typeof f?f.handleEvent(h):f.apply(this,g),h.isPropagationStopped())return b;return b}},c.mixin=function(a,b){b=b||{},a="function"==typeof a?a.prototype:a,["on","off","once","trigger","change"].forEach(function(d){var e=b[d]||d;a[e]=c.prototype[d]}),Object.defineProperties(a,{__events:{value:null,writable:!0},__once:{value:null,writable:!0}})},c}); !function(t,e){"function"==typeof define&&define.amd?define(["three","d.js","uevent","dot/doT"],e):"object"==typeof module&&module.exports?module.exports=e(require("three"),require("d.js"),require("uevent"),require("dot/doT")):t.PhotoSphereViewer=e(t.THREE,t.D,t.uEvent,t.doT)}(this,function(l,u,t,o){"use strict";function d(t){if(!(this instanceof d))return new d(t);if(d.SYSTEM.loaded||d._loadSystem(),this.config=S.clone(d.DEFAULTS),S.deepmerge(this.config,t),!t.container)throw new x("No value given for container.");if(!d.SYSTEM.isCanvasSupported)throw new x("Canvas is not supported.");if(!(d.SYSTEM.isWebGLSupported&&this.config.webgl||S.checkTHREE("CanvasRenderer","Projector")))throw new x("Missing Three.js components: CanvasRenderer, Projector. Get them from three.js-examples package.");if(this.config.longitude_range&&2!==this.config.longitude_range.length&&(this.config.longitude_range=null,console.warn("PhotoSphereViewer: longitude_range must have exactly two elements.")),this.config.latitude_range?2!==this.config.latitude_range.length?(this.config.latitude_range=null,console.warn("PhotoSphereViewer: latitude_range must have exactly two elements.")):this.config.latitude_range[0]>this.config.latitude_range[1]&&(this.config.latitude_range=[this.config.latitude_range[1],this.config.latitude_range[0]],console.warn("PhotoSphereViewer: latitude_range values must be ordered.")):void 0===this.config.tilt_up_max&&void 0===this.config.tilt_down_max||(this.config.latitude_range=[void 0!==this.config.tilt_down_max?this.config.tilt_down_max-Math.PI/4:-S.HalfPI,void 0!==this.config.tilt_up_max?this.config.tilt_up_max+Math.PI/4:S.HalfPI],console.warn("PhotoSphereViewer: tilt_up_max and tilt_down_max are deprecated, use latitude_range instead.")),this.config.max_fov"),o=t.substring(e,i);if(-1===e||-1===i||-1===o.indexOf("GPano:"))s.resolve(null);else{var n={full_width:parseInt(S.getXMPValue(o,"FullPanoWidthPixels")),full_height:parseInt(S.getXMPValue(o,"FullPanoHeightPixels")),cropped_width:parseInt(S.getXMPValue(o,"CroppedAreaImageWidthPixels")),cropped_height:parseInt(S.getXMPValue(o,"CroppedAreaImageHeightPixels")),cropped_x:parseInt(S.getXMPValue(o,"CroppedAreaLeftPixels")),cropped_y:parseInt(S.getXMPValue(o,"CroppedAreaTopPixels"))};n.full_width&&n.full_height&&n.cropped_width&&n.cropped_height?s.resolve(n):(console.warn("PhotoSphereViewer: invalid XMP data"),s.resolve(null))}}else 3===r.readyState&&this.loader.setProgress(a+=10)}.bind(this),r.onprogress=function(t){if(t.lengthComputable){var e=parseInt(t.loaded/t.total*100);ar[t]&&(r[t]=i,this.loader.setProgress(S.sum(r)/6),this.trigger("panorama-load-progress",n[t],r[t]))}},o=function(t,e){throw this.container.textContent="Cannot load image",s.reject(e),new x("Cannot load image "+t)},p=0;p<6;p++){if(this.config.cache_texture){var c=this.getPanoramaCache(n[p]);if(c){h++,r[p]=100,a[p]=c.image;continue}}t.load(n[p],e.bind(this,p),i.bind(this,p),o.bind(this,p))}return 6===h&&s.resolve(a),s.promise},d.prototype._setTexture=function(t){if(this.scene||this._createScene(),this.prop.isCubemap)for(var e=0;e<6;e++)this.mesh.material[e].map&&this.mesh.material[e].map.dispose(),this.mesh.material[e].map=t[e];else this.mesh.material.map&&this.mesh.material.map.dispose(),this.mesh.material.map=t;this.trigger("panorama-loaded"),this._render()},d.prototype._createScene=function(){this.raycaster=new l.Raycaster,this.renderer=d.SYSTEM.isWebGLSupported&&this.config.webgl?new l.WebGLRenderer:new l.CanvasRenderer,this.renderer.setSize(this.prop.size.width,this.prop.size.height),this.renderer.setPixelRatio(d.SYSTEM.pixelRatio);var t=d.SPHERE_RADIUS;this.prop.isCubemap&&(t*=Math.sqrt(3)),this.config.fisheye&&(t+=d.SPHERE_RADIUS),this.camera=new l.PerspectiveCamera(this.config.default_fov,this.prop.size.width/this.prop.size.height,1,t),this.camera.position.set(0,0,0),this.scene=new l.Scene,this.scene.add(this.camera),this.prop.isCubemap?this.mesh=this._createCubemap():this.mesh=this._createSphere(),this.scene.add(this.mesh),this.canvas_container=document.createElement("div"),this.canvas_container.className="psv-canvas-container",this.renderer.domElement.className="psv-canvas",this.container.appendChild(this.canvas_container),this.canvas_container.appendChild(this.renderer.domElement)},d.prototype._createSphere=function(t){t=t||1;var e=new l.SphereGeometry(d.SPHERE_RADIUS*t,d.SPHERE_VERTICES,d.SPHERE_VERTICES,-S.HalfPI),i=new l.MeshBasicMaterial({side:l.DoubleSide,overdraw:d.SYSTEM.isWebGLSupported&&this.config.webgl?0:1}),o=new l.Mesh(e,i);return o.scale.x=-1,o.rotation.x=this.config.sphere_correction.tilt,o.rotation.y=this.config.sphere_correction.pan,o.rotation.z=this.config.sphere_correction.roll,o},d.prototype._createCubemap=function(t){t=t||1;for(var e=new l.BoxGeometry(2*d.SPHERE_RADIUS*t,2*d.SPHERE_RADIUS*t,2*d.SPHERE_RADIUS*t,d.CUBE_VERTICES,d.CUBE_VERTICES,d.CUBE_VERTICES),i=[],o=0;o<6;o++)i.push(new l.MeshBasicMaterial({side:l.BackSide,overdraw:d.SYSTEM.isWebGLSupported&&this.config.webgl?0:1}));var n=new l.Mesh(e,i);return n.position.x-=d.SPHERE_RADIUS*t,n.position.y-=d.SPHERE_RADIUS*t,n.position.z-=d.SPHERE_RADIUS*t,n.applyMatrix((new l.Matrix4).makeScale(1,1,-1)),n},d.prototype._transition=function(i,t){var o;if(this.prop.isCubemap?(t&&(console.warn("PhotoSphereViewer: cannot perform cubemap transition to different position."),t=void 0),(o=this._createCubemap(.9)).material.forEach(function(t,e){t.map=i[e],t.transparent=!0,t.opacity=0})):((o=this._createSphere(.9)).material.map=i,o.material.transparent=!0,o.material.opacity=0),t){o.rotateY(t.longitude-this.prop.position.longitude);var e=new l.Vector3(0,1,0).cross(this.camera.getWorldDirection()).normalize(),n=(new l.Quaternion).setFromAxisAngle(e,t.latitude-this.prop.position.latitude);o.quaternion.multiplyQuaternions(n,o.quaternion),(this.config.latitude_range||this.config.longitude_range)&&(this.config.longitude_range=this.config.latitude_range=null,console.warn("PhotoSphereViewer: trying to perform transition with longitude_range and/or latitude_range, ranges cleared."))}return this.scene.add(o),this.needsUpdate(),S.animation({properties:{opacity:{start:0,end:1}},duration:this.config.transition.duration,easing:"outCubic",onTick:function(t){if(this.prop.isCubemap)for(var e=0;e<6;e++)o.material[e].opacity=t.opacity;else o.material.opacity=t.opacity;this.needsUpdate()}.bind(this)}).then(function(){this._setTexture(i),this.scene.remove(o),o.geometry.dispose(),o.geometry=null,t&&this.rotate(t)}.bind(this))},d.prototype._reverseAutorotate=function(){var e=this,t=-this.config.anim_speed,i=this.config.longitude_range;this.config.longitude_range=null,S.animation({properties:{speed:{start:this.config.anim_speed,end:0}},duration:300,easing:"inSine",onTick:function(t){e.config.anim_speed=t.speed}}).then(function(){return S.animation({properties:{speed:{start:0,end:t}},duration:300,easing:"outSine",onTick:function(t){e.config.anim_speed=t.speed}})}).then(function(){e.config.longitude_range=i,e.config.anim_speed=t})},d.prototype._putPanoramaCache=function(t){if(!this.config.cache_texture)throw new x("Cannot add panorama to cache, cache_texture is disabled");var e=this.getPanoramaCache(t.panorama);e?(e.image=t.image,e.pano_data=t.pano_data):(this.prop.cache=this.prop.cache.slice(0,this.config.cache_texture-1),this.prop.cache.unshift(t)),this.trigger("panorama-cached",t.panorama)},d.prototype._stopAll=function(){this.stopAutorotate(),this.stopAnimation(),this.stopGyroscopeControl(),this.stopStereoView()},d.MOVE_THRESHOLD=4,d.ANGLE_THRESHOLD=.003,d.DBLCLICK_DELAY=300,d.INERTIA_WINDOW=300,d.SPHERE_RADIUS=100,d.SPHERE_VERTICES=64,d.CUBE_VERTICES=8,d.CUBE_MAP=[0,2,4,5,3,1],d.CUBE_HASHMAP=["left","right","top","bottom","back","front"],d.SYSTEM={loaded:!1,pixelRatio:1,isWebGLSupported:!1,isCanvasSupported:!1,deviceOrientationSupported:null,maxTextureWidth:0,mouseWheelEvent:null,fullscreenEvent:null},d.ICONS={},d.DEFAULTS={panorama:null,container:null,caption:null,usexmpdata:!0,pano_data:null,webgl:!0,min_fov:30,max_fov:90,default_fov:null,default_long:0,default_lat:0,sphere_correction:{pan:0,tilt:0,roll:0},longitude_range:null,latitude_range:null,move_speed:1,zoom_speed:2,time_anim:2e3,anim_speed:"2rpm",anim_lat:null,fisheye:!1,navbar:["autorotate","zoom","download","markers","caption","gyroscope","stereo","fullscreen"],tooltip:{offset:5,arrow_size:7,delay:100},lang:{autorotate:"Automatic rotation",zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",download:"Download",fullscreen:"Fullscreen",markers:"Markers",gyroscope:"Gyroscope",stereo:"Stereo view",stereo_notification:"Click anywhere to exit stereo view.",please_rotate:["Please rotate your device","(or tap to continue)"],two_fingers:["Use two fingers to navigate"]},mousewheel:!0,mousewheel_factor:1,mousemove:!0,mousemove_hover:!1,touchmove_two_fingers:!1,keyboard:{ArrowUp:"rotateLatitudeUp",ArrowDown:"rotateLatitudeDown",ArrowRight:"rotateLongitudeRight",ArrowLeft:"rotateLongitudeLeft",PageUp:"zoomIn",PageDown:"zoomOut","+":"zoomIn","-":"zoomOut"," ":"toggleAutorotate"},move_inertia:!0,click_event_on_marker:!1,transition:{duration:1500,loader:!0},loading_img:null,loading_txt:"Loading...",size:null,cache_texture:0,templates:{},markers:[],with_credentials:!1},d.TEMPLATES={markersList:'

{{=it.config.lang.markers }}

    {{~ it.markers: marker }}
  • {{? marker.image }}{{?}}

    {{? marker.tooltip }}{{=marker.tooltip.content }}{{?? marker.html }}{{=marker.html }}{{??}}{{=marker.id }}{{?}}

  • {{~}}
'},d.prototype._bindEvents=function(){window.addEventListener("resize",this),this.config.mousemove&&(this.hud.container.style.cursor="move",this.config.mousemove_hover?(this.hud.container.addEventListener("mouseenter",this),this.hud.container.addEventListener("mouseleave",this)):(this.hud.container.addEventListener("mousedown",this),window.addEventListener("mouseup",this)),this.hud.container.addEventListener("touchstart",this),window.addEventListener("touchend",this),this.hud.container.addEventListener("mousemove",this),this.hud.container.addEventListener("touchmove",this)),d.SYSTEM.fullscreenEvent&&document.addEventListener(d.SYSTEM.fullscreenEvent,this),this.config.mousewheel&&this.hud.container.addEventListener(d.SYSTEM.mouseWheelEvent,this),this.on("_side-reached",function(t){this.isAutorotateEnabled()&&("left"!==t&&"right"!==t||this._reverseAutorotate())})},d.prototype._unbindEvents=function(){window.removeEventListener("resize",this),this.config.mousemove&&(this.hud.container.removeEventListener("mousedown",this),this.hud.container.removeEventListener("mouseenter",this),this.hud.container.removeEventListener("touchstart",this),window.removeEventListener("mouseup",this),window.removeEventListener("touchend",this),this.hud.container.removeEventListener("mouseleave",this),this.hud.container.removeEventListener("mousemove",this),this.hud.container.removeEventListener("touchmove",this)),d.SYSTEM.fullscreenEvent&&document.removeEventListener(d.SYSTEM.fullscreenEvent,this),this.config.mousewheel&&this.hud.container.removeEventListener(d.SYSTEM.mouseWheelEvent,this),this.off("_side-reached")},d.prototype.handleEvent=function(t){switch(t.type){case"resize":S.throttle(this._onResize(),50);break;case"keydown":this._onKeyDown(t);break;case"mousedown":case"mouseenter":this._onMouseDown(t);break;case"touchstart":this._onTouchStart(t);break;case"mouseup":case"mouseleave":this._onMouseUp(t);break;case"touchend":this._onTouchEnd(t);break;case"mousemove":this._onMouseMove(t);break;case"touchmove":this._onTouchMove(t);break;case d.SYSTEM.fullscreenEvent:this._fullscreenToggled();break;case d.SYSTEM.mouseWheelEvent:this._onMouseWheel(t)}},d.prototype._onResize=function(){this.container.clientWidth===this.prop.size.width&&this.container.clientHeight===this.prop.size.height||(this.prop.size.width=parseInt(this.container.clientWidth),this.prop.size.height=parseInt(this.container.clientHeight),this.prop.aspect=this.prop.size.width/this.prop.size.height,this.needsUpdate(),this.renderer&&(this.stereoEffect||this.renderer).setSize(this.prop.size.width,this.prop.size.height),this.trigger("size-updated",this.getSize()))},d.prototype._onKeyDown=function(t){var e=0,i=0,o=0,n=S.getEventKey(t);switch(this.config.keyboard[n]){case"rotateLatitudeUp":i=.01;break;case"rotateLatitudeDown":i=-.01;break;case"rotateLongitudeRight":e=.01;break;case"rotateLongitudeLeft":e=-.01;break;case"zoomIn":o=1;break;case"zoomOut":o=-1;break;case"toggleAutorotate":this.toggleAutorotate()}0!==o?this.zoom(this.prop.zoom_lvl+o*this.config.zoom_speed):0===i&&0===e||this.rotate({longitude:this.prop.position.longitude+e*this.prop.move_speed*this.prop.hFov,latitude:this.prop.position.latitude+i*this.prop.move_speed*this.prop.vFov})},d.prototype._onMouseDown=function(t){this._startMove(t)},d.prototype._onMouseUp=function(t){this._stopMove(t),this.isStereoEnabled()&&this.stopStereoView()},d.prototype._onMouseMove=function(t){0!==t.buttons?(t.preventDefault(),this._move(t)):this.config.mousemove_hover&&this._moveAbsolute(t)},d.prototype._onTouchStart=function(t){1===t.touches.length?this.config.touchmove_two_fingers||this._startMove(t.touches[0]):2===t.touches.length&&this._startMoveZoom(t)},d.prototype._onTouchEnd=function(t){1===t.touches.length?this._stopMoveZoom():0===t.touches.length&&(this._stopMove(t.changedTouches[0]),this.config.touchmove_two_fingers&&this.overlay.hideOverlay())},d.prototype._onTouchMove=function(t){1===t.touches.length?this.config.touchmove_two_fingers?this.overlay.showOverlay({image:d.ICONS["gesture.svg"],text:this.config.lang.two_fingers[0]}):(t.preventDefault(),this._move(t.touches[0])):2===t.touches.length&&(t.preventDefault(),this._moveZoom(t))},d.prototype._startMove=function(t){this.stopAutorotate(),this.stopAnimation(),this.prop.mouse_x=this.prop.start_mouse_x=parseInt(t.clientX),this.prop.mouse_y=this.prop.start_mouse_y=parseInt(t.clientY),this.prop.moving=!0,this.prop.zooming=!1,this.prop.mouse_history.length=0,this._logMouseMove(t)},d.prototype._startMoveZoom=function(t){var e=[{x:parseInt(t.touches[0].clientX),y:parseInt(t.touches[0].clientY)},{x:parseInt(t.touches[1].clientX),y:parseInt(t.touches[1].clientY)}];this.prop.pinch_dist=Math.sqrt(Math.pow(e[0].x-e[1].x,2)+Math.pow(e[0].y-e[1].y,2)),this.prop.mouse_x=this.prop.start_mouse_x=(e[0].x+e[1].x)/2,this.prop.mouse_y=this.prop.start_mouse_x=(e[0].y+e[1].y)/2,this.prop.moving=!0,this.prop.zooming=!0},d.prototype._stopMove=function(t){S.getClosest(t.target,".psv-hud")&&this.prop.moving&&(Math.abs(t.clientX-this.prop.start_mouse_x)d.INERTIA_WINDOW/10?(this.prop.mouse_history.splice(0,o),o=0):o++,this.prop.mouse_history[0][o])},d.prototype.load=function(){if(!this.config.panorama)throw new x("No value given for panorama.");return this.setPanorama(this.config.panorama,!1)},d.prototype.getPosition=function(){return{longitude:this.prop.position.longitude,latitude:this.prop.position.latitude}},d.prototype.getZoomLevel=function(){return this.prop.zoom_lvl},d.prototype.getSize=function(){return{width:this.prop.size.width,height:this.prop.size.height}},d.prototype.isAutorotateEnabled=function(){return!!this.prop.autorotate_cb},d.prototype.isGyroscopeEnabled=function(){return!!this.prop.orientation_cb},d.prototype.isStereoEnabled=function(){return!!this.stereoEffect},d.prototype.isFullscreenEnabled=function(){return S.isFullscreenEnabled(this.container)},d.prototype.needsUpdate=function(){this.prop.needsUpdate=!0},d.prototype.render=function(){this._render()},d.prototype.destroy=function(){window.cancelAnimationFrame(this.prop.main_reqid),this._stopAll(),this.stopKeyboardControl(),this.stopNoSleep(),this.exitFullscreen(),this.unlockOrientation(),this._unbindEvents(),this.tooltip&&this.tooltip.destroy(),this.notification&&this.notification.destroy(),this.hud&&this.hud.destroy(),this.loader&&this.loader.destroy(),this.navbar&&this.navbar.destroy(),this.panel&&this.panel.destroy(),this.overlay&&this.overlay.destroy(),this.scene&&S.cleanTHREEScene(this.scene),this.canvas_container&&this.container.removeChild(this.canvas_container),this.parent.removeChild(this.container),delete this.parent.photoSphereViewer,delete this.parent,delete this.container,delete this.loader,delete this.navbar,delete this.hud,delete this.panel,delete this.tooltip,delete this.notification,delete this.overlay,delete this.canvas_container,delete this.renderer,delete this.noSleep,delete this.scene,delete this.camera,delete this.mesh,delete this.raycaster,delete this.passes,delete this.config,this.prop.cache.length=0},d.prototype.setPanorama=function(t,e,i){if(null!==this.prop.loading_promise)throw new x("Loading already in progress");return"boolean"==typeof e&&(i=e,e=void 0),e&&(this.cleanPosition(e),this._stopAll()),this.config.panorama=t,i&&this.config.transition&&this.scene?(this.config.transition.loader&&this.loader.show(),this.prop.loading_promise=this._loadTexture(this.config.panorama).then(function(t){return this.loader.hide(),this._transition(t,e)}.bind(this)).ensure(function(){this.loader.hide(),this.prop.loading_promise=null}.bind(this)).rethrow()):(this.loader.show(),this.canvas_container&&(this.canvas_container.style.opacity=0),this.prop.loading_promise=this._loadTexture(this.config.panorama).then(function(t){this._setTexture(t),e&&this.rotate(e)}.bind(this)).ensure(function(){this.loader.hide(),this.canvas_container.style.opacity=1,this.prop.loading_promise=null}.bind(this)).rethrow()),this.prop.loading_promise},d.prototype.startAutorotate=function(){this._stopAll(),this.prop.autorotate_cb=this._getAutorotateUpdate(),this.on("before-render",this.prop.autorotate_cb),this.trigger("autorotate",!0)},d.prototype._getAutorotateUpdate=function(){var e,i;return function(t){i=void 0===e?0:t-e,e=t,this.rotate({longitude:this.prop.position.longitude+this.config.anim_speed*i/1e3,latitude:this.prop.position.latitude-(this.prop.position.latitude-this.config.anim_lat)/200})}},d.prototype.stopAutorotate=function(){this.prop.start_timeout&&(window.clearTimeout(this.prop.start_timeout),this.prop.start_timeout=null),this.isAutorotateEnabled()&&(this.off("before-render",this.prop.autorotate_cb),this.prop.autorotate_cb=null,this.trigger("autorotate",!1))},d.prototype.toggleAutorotate=function(){this.isAutorotateEnabled()?this.stopAutorotate():this.startAutorotate()},d.prototype.startGyroscopeControl=function(){if(S.checkTHREE("DeviceOrientationControls"))return d.SYSTEM.deviceOrientationSupported.then(function(t){if(!t)return console.warn("PhotoSphereViewer: gyroscope not available"),u.rejected();this._stopAll(),this.doControls=new l.DeviceOrientationControls(this.camera),this.doControls.alphaOffset=this.prop.position.longitude,this.doControls.update();var e=this.camera.getWorldDirection(new l.Vector3),i=this.vector3ToSphericalCoords(e);this.prop.gyro_alpha_offset=i.longitude,this.prop.orientation_cb=this._getOrientationUpdate(),this.on("before-render",this.prop.orientation_cb),this.trigger("gyroscope-updated",!0)}.bind(this));throw new x("Missing Three.js components: DeviceOrientationControls. Get them from three.js-examples package.")},d.prototype._getOrientationUpdate=function(){return function(){this.doControls.alphaOffset=this.prop.gyro_alpha_offset,this.doControls.update(),this.camera.getWorldDirection(this.prop.direction),this.prop.direction.multiplyScalar(d.SPHERE_RADIUS);var t=this.vector3ToSphericalCoords(this.prop.direction);this.prop.position.longitude=t.longitude,this.prop.position.latitude=t.latitude,this.needsUpdate()}},d.prototype.stopGyroscopeControl=function(){this.isGyroscopeEnabled()&&(this.off("before-render",this.prop.orientation_cb),this.prop.orientation_cb=null,this.doControls.disconnect(),this.doControls=null,this.trigger("gyroscope-updated",!1))},d.prototype.toggleGyroscopeControl=function(){this.isGyroscopeEnabled()?this.stopGyroscopeControl():this.startGyroscopeControl()},d.prototype.startNoSleep=function(){"NoSleep"in window?(this.noSleep||(this.noSleep=new NoSleep),this.noSleep.enable()):console.warn("PhotoSphereViewer: NoSleep is not available")},d.prototype.stopNoSleep=function(){this.noSleep&&this.noSleep.disable()},d.prototype.startStereoView=function(){if(!S.checkTHREE("DeviceOrientationControls","StereoEffect"))throw new x("Missing Three.js components: StereoEffect, DeviceOrientationControls. Get them from three.js-examples package.");this.startNoSleep(),this.enterFullscreen(),this.lockOrientation(),this.startGyroscopeControl().then(function(){this.stereoEffect=new l.StereoEffect(this.renderer),this.needsUpdate(),this.hud.hide(),this.navbar.hide(),this.panel.hidePanel(),this.trigger("stereo-updated",!0),this.notification.showNotification({content:this.config.lang.stereo_notification,timeout:3e3})}.bind(this),function(){this.unlockOrientation(),this.exitFullscreen(),this.stopNoSleep()}.bind(this))},d.prototype.stopStereoView=function(){this.isStereoEnabled()&&(this.stereoEffect=null,this.needsUpdate(),this.hud.show(),this.navbar.show(),this.unlockOrientation(),this.exitFullscreen(),this.stopNoSleep(),this.stopGyroscopeControl(),this.trigger("stereo-updated",!1))},d.prototype.lockOrientation=function(){var t,e=function(){this.isStereoEnabled()&&window.innerHeight>window.innerWidth&&this.overlay.showOverlay({image:d.ICONS["mobile-rotate.svg"],text:this.config.lang.please_rotate[0],subtext:this.config.lang.please_rotate[1]}),t&&window.clearTimeout(t)};window.screen&&window.screen.orientation?(window.screen.orientation.lock("landscape").then(null,e.bind(this)),t=setTimeout(e.bind(this),500)):e.apply(this)},d.prototype.unlockOrientation=function(){window.screen&&window.screen.orientation?window.screen.orientation.unlock():this.overlay.hideOverlay()},d.prototype.toggleStereoView=function(){this.isStereoEnabled()?this.stopStereoView():this.startStereoView()},d.prototype.rotate=function(t){this.cleanPosition(t),this.applyRanges(t).forEach(this.trigger.bind(this,"_side-reached")),this.prop.position.longitude=t.longitude,this.prop.position.latitude=t.latitude,this.needsUpdate(),this.trigger("position-updated",this.getPosition())},d.prototype.animate=function(t,e){if(this._stopAll(),this.cleanPosition(t),!e||Math.abs(t.longitude-this.prop.position.longitude)=Math.PI?e-Math.PI:e+Math.PI,latitude:S.HalfPI-i}},d.prototype.sphericalCoordsToTextureCoords=function(t){if(this.prop.isCubemap)throw new x("Unable to use texture coords with cubemap.");var e=t.longitude/S.TwoPI*this.prop.pano_data.full_width,i=t.latitude/Math.PI*this.prop.pano_data.full_height;return{x:parseInt(t.longitudee[1]?t.longitude>e[1]&&t.longitudee[0]/2+e[1]/2?(t.longitude=e[0],o.push("left")):(t.longitude=e[1],o.push("right"))):t.longitudee[1]&&(t.longitude=e[1],o.push("right"))),this.config.latitude_range&&(e=S.clone(this.config.latitude_range),i=l.Math.degToRad(this.prop.vFov)/2,e[0]=S.parseAngle(Math.min(e[0]+i,e[1]),!0),e[1]=S.parseAngle(Math.max(e[1]-i,e[0]),!0),t.latitudee[1]&&(t.latitude=e[1],o.push("top"))),o},n.className=null,n.publicMethods=[],n.prototype.create=function(){this.container=document.createElement("div"),this.constructor.className&&(this.container.className=this.constructor.className),this.parent.container.appendChild(this.container)},n.prototype.destroy=function(){this.parent.container.removeChild(this.container),this.constructor.publicMethods&&this.constructor.publicMethods.forEach(function(t){delete this.psv[t]},this),delete this.container,delete this.psv,delete this.parent},n.prototype.hide=function(){this.container.style.display="none",this.visible=!1},n.prototype.show=function(){this.container.style.display="",this.visible=!0},((s.prototype=Object.create(n.prototype)).constructor=s).className="psv-hud",s.publicMethods=["addMarker","removeMarker","updateMarker","clearMarkers","getMarker","getCurrentMarker","gotoMarker","hideMarker","showMarker","toggleMarker","toggleMarkersList","showMarkersList","hideMarkersList"],s.prototype.create=function(){n.prototype.create.call(this),this.svgContainer=document.createElementNS(S.svgNS,"svg"),this.svgContainer.setAttribute("class","psv-hud-svg-container"),this.container.appendChild(this.svgContainer),this.container.addEventListener("mouseenter",this,!0),this.container.addEventListener("mouseleave",this,!0),this.container.addEventListener("mousemove",this,!0),this.psv.on("click",this),this.psv.on("dblclick",this),this.psv.on("render",this),this.psv.on("open-panel",this),this.psv.on("close-panel",this)},s.prototype.destroy=function(){this.clearMarkers(!1),this.container.removeEventListener("mouseenter",this),this.container.removeEventListener("mouseleave",this),this.container.removeEventListener("mousemove",this),this.psv.off("click",this),this.psv.off("dblclick",this),this.psv.off("render",this),this.psv.off("open-panel",this),this.psv.off("close-panel",this),delete this.svgContainer,n.prototype.destroy.call(this)},s.prototype.handleEvent=function(t){switch(t.type){case"mouseenter":this._onMouseEnter(t);break;case"mouseleave":this._onMouseLeave(t);break;case"mousemove":this._onMouseMove(t);break;case"click":this._onClick(t.args[0],t,!1);break;case"dblclick":this._onClick(t.args[0],t,!0);break;case"render":this.renderMarkers();break;case"open-panel":this._onPanelOpened();break;case"close-panel":this._onPanelClosed()}},s.prototype.addMarker=function(t,e){if(!t.id)throw new x("missing marker id");if(this.markers[t.id])throw new x('marker "'+t.id+'" already exists');var i=new k(t,this.psv);return i.isNormal()?this.container.appendChild(i.$el):this.svgContainer.appendChild(i.$el),this.markers[i.id]=i,!1!==e&&this.renderMarkers(),i},s.prototype.getMarker=function(t){var e="object"==typeof t?t.id:t;if(!this.markers[e])throw new x('cannot find marker "'+e+'"');return this.markers[e]},s.prototype.getCurrentMarker=function(){return this.currentMarker},s.prototype.updateMarker=function(t,e){var i=this.getMarker(t);return i.update(t),!1!==e&&this.renderMarkers(),i},s.prototype.removeMarker=function(t,e){(t=this.getMarker(t)).isNormal()?this.container.removeChild(t.$el):this.svgContainer.removeChild(t.$el),this.hoveringMarker===t&&this.psv.tooltip.hideTooltip(),t.destroy(),delete this.markers[t.id],!1!==e&&this.renderMarkers()},s.prototype.clearMarkers=function(t){Object.keys(this.markers).forEach(function(t){this.removeMarker(t,!1)},this),!1!==t&&this.renderMarkers()},s.prototype.gotoMarker=function(t,e){return t=this.getMarker(t),this.psv.animate(t,e).then(function(){this.psv.trigger("goto-marker-done",t)}.bind(this))},s.prototype.hideMarker=function(t){this.getMarker(t).visible=!1,this.renderMarkers()},s.prototype.showMarker=function(t){this.getMarker(t).visible=!0,this.renderMarkers()},s.prototype.toggleMarker=function(t){this.getMarker(t).visible^=!0,this.renderMarkers()},s.prototype.toggleMarkersList=function(){this.prop.panelOpened?this.hideMarkersList():this.showMarkersList()},s.prototype.showMarkersList=function(){var e=[];S.forEach(this.markers,function(t){e.push(t)});var t=this.psv.config.templates.markersList({markers:this.psv.change("render-markers-list",e),config:this.psv.config});this.prop.panelOpening=!0,this.psv.panel.showPanel(t,!0),this.psv.panel.container.querySelector(".psv-markers-list").addEventListener("click",this._onClickItem.bind(this))},s.prototype.hideMarkersList=function(){this.prop.panelOpened&&this.psv.panel.hidePanel()},s.prototype.renderMarkers=function(){if(this.visible){var r=this.psv.isGyroscopeEnabled()?l.Math.radToDeg(this.psv.camera.rotation.z):0;S.forEach(this.markers,function(t){var e=t.visible;if(e&&t.isPoly()){var i=this._getPolyPositions(t);if(e=i.length>(t.isPolygon()?2:1)){t.position2D=this._getPolyDimensions(t,i);var o=i.map(function(t){return t.x+","+t.y}).join(" ");t.$el.setAttributeNS(null,"points",o)}}else if(e){var n=this._getMarkerPosition(t);if(e=this._isMarkerVisible(t,n)){t.position2D=n;var s=t.getScale(this.psv.getZoomLevel());t.isSvg()?t.$el.setAttributeNS(null,"transform","translate("+n.x+", "+n.y+")"+(1!==s?" scale("+s+", "+s+")":"")+(!t.lockRotation&&r?" rotate("+r+")":"")):t.$el.style.transform="translate3D("+n.x+"px, "+n.y+"px, 0px)"+(1!==s?" scale("+s+", "+s+")":"")+(!t.lockRotation&&r?" rotateZ("+r+"deg)":"")}}S.toggleClass(t.$el,"psv-marker--visible",e)}.bind(this))}},s.prototype._isMarkerVisible=function(t,e){return 0=this.prop.width?(this.button.hide(),this.content.style.display=""):(this.button.show(),this.content.style.display="none")},((h.prototype=Object.create(n.prototype)).constructor=h).className="psv-notification",h.publicMethods=["showNotification","hideNotification","isNotificationVisible"],h.prototype.create=function(){n.prototype.create.call(this),this.content=document.createElement("div"),this.content.className="psv-notification-content",this.container.appendChild(this.content),this.content.addEventListener("click",this.hideNotification.bind(this))},h.prototype.destroy=function(){delete this.content,n.prototype.destroy.call(this)},h.prototype.isNotificationVisible=function(){return this.container.classList.contains("psv-notification--visible")},h.prototype.showNotification=function(t){"string"==typeof t&&(t={content:t}),this.content.innerHTML=t.content,this.container.classList.add("psv-notification--visible"),this.psv.trigger("show-notification"),t.timeout&&setTimeout(this.hideNotification.bind(this),t.timeout)},h.prototype.hideNotification=function(){this.isNotificationVisible()&&(this.container.classList.remove("psv-notification--visible"),this.psv.trigger("hide-notification"))},((p.prototype=Object.create(n.prototype)).constructor=p).className="psv-overlay",p.publicMethods=["showOverlay","hideOverlay","isOverlayVisible"],p.prototype.create=function(){n.prototype.create.call(this),this.image=document.createElement("div"),this.image.className="psv-overlay-image",this.container.appendChild(this.image),this.text=document.createElement("div"),this.text.className="psv-overlay-text",this.container.appendChild(this.text),this.subtext=document.createElement("div"),this.subtext.className="psv-overlay-subtext",this.container.appendChild(this.subtext),this.container.addEventListener("click",this.hideOverlay.bind(this))},p.prototype.destroy=function(){delete this.image,delete this.text,delete this.subtext,n.prototype.destroy.call(this)},p.prototype.isOverlayVisible=function(){return this.visible},p.prototype.showOverlay=function(t){"string"==typeof t&&(t={text:t}),this.image.innerHTML=t.image||"",this.text.innerHTML=t.text||"",this.subtext.innerHTML=t.subtext||"",this.show(),this.psv.trigger("show-overlay")},p.prototype.hideOverlay=function(){this.isOverlayVisible()&&(this.hide(),this.psv.trigger("hide-overlay"))},((c.prototype=Object.create(n.prototype)).constructor=c).className="psv-panel",c.publicMethods=["showPanel","hidePanel"],c.prototype.create=function(){n.prototype.create.call(this),this.container.innerHTML='
',this.content=this.container.querySelector(".psv-panel-content"),this.container.querySelector(".psv-panel-close-button").addEventListener("click",this.hidePanel.bind(this)),this.psv.config.mousewheel&&this.container.addEventListener(d.SYSTEM.mouseWheelEvent,function(t){t.stopPropagation()});var t=this.container.querySelector(".psv-panel-resizer");t.addEventListener("mousedown",this),t.addEventListener("touchstart",this),this.psv.container.addEventListener("mouseup",this),this.psv.container.addEventListener("touchend",this),this.psv.container.addEventListener("mousemove",this),this.psv.container.addEventListener("touchmove",this)},c.prototype.destroy=function(){this.psv.container.removeEventListener("mousemove",this),this.psv.container.removeEventListener("touchmove",this),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),delete this.prop,delete this.content,n.prototype.destroy.call(this)},c.prototype.handleEvent=function(t){switch(t.type){case"mousedown":this._onMouseDown(t);break;case"touchstart":this._onTouchStart(t);break;case"mousemove":this._onMouseMove(t);break;case"touchmove":this._onTouchMove(t);break;case"mouseup":case"touchend":this._onMouseUp(t)}},c.prototype.showPanel=function(t,e){this.content.innerHTML=t,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),S.toggleClass(this.content,"psv-panel-content--no-margin",!0===e),this.prop.opened=!0,this.psv.trigger("open-panel")},c.prototype.hidePanel=function(){this.content.innerHTML=null,this.prop.opened=!1,this.container.classList.remove("psv-panel--open"),this.psv.trigger("close-panel")},c.prototype._onMouseDown=function(t){t.stopPropagation(),this._startResize(t)},c.prototype._onTouchStart=function(t){t.stopPropagation(),this._startResize(t.changedTouches[0])},c.prototype._onMouseUp=function(t){this.prop.mousedown&&(t.stopPropagation(),this.prop.mousedown=!1,this.content.classList.remove("psv-panel-content--no-interaction"))},c.prototype._onMouseMove=function(t){this.prop.mousedown&&(t.stopPropagation(),this._resize(t))},c.prototype._onTouchMove=function(t){this.prop.mousedown&&this._resize(t.touches[0])},c.prototype._startResize=function(t){this.prop.mouse_x=parseInt(t.clientX),this.prop.mouse_y=parseInt(t.clientY),this.prop.mousedown=!0,this.content.classList.add("psv-panel-content--no-interaction")},c.prototype._resize=function(t){var e=parseInt(t.clientX),i=parseInt(t.clientY);this.container.style.width=this.container.offsetWidth-(e-this.prop.mouse_x)+"px",this.prop.mouse_x=e,this.prop.mouse_y=i},((f.prototype=Object.create(n.prototype)).constructor=f).className="psv-tooltip",f.publicMethods=["showTooltip","hideTooltip","isTooltipVisible"],f.leftMap={0:"left",.5:"center",1:"right"},f.topMap={0:"top",.5:"center",1:"bottom"},f.prototype.create=function(){n.prototype.create.call(this),this.container.innerHTML='
',this.container.style.top="-1000px",this.container.style.left="-1000px",this.content=this.container.querySelector(".psv-tooltip-content"),this.arrow=this.container.querySelector(".psv-tooltip-arrow"),this.psv.on("render",this)},f.prototype.destroy=function(){this.psv.off("render",this),delete this.config,delete this.prop,n.prototype.destroy.call(this)},f.prototype.handleEvent=function(t){switch(t.type){case"render":this.hideTooltip()}},f.prototype.isTooltipVisible=function(){return this.container.classList.contains("psv-tooltip--visible")},f.prototype.showTooltip=function(t){this.prop.timeout&&(window.clearTimeout(this.prop.timeout),this.prop.timeout=null);var e=this.isTooltipVisible(),i=this.container,o=this.content,n=this.arrow;if(t.position||(t.position=["top","center"]),t.box||(t.box={width:0,height:0}),"string"==typeof t.position){var s=S.parsePosition(t.position);if(!(s.left in f.leftMap&&s.top in f.topMap))throw new x('unable to parse tooltip position "'+t.position+'"');t.position=[f.topMap[s.top],f.leftMap[s.left]]}if("center"===t.position[0]&&"center"===t.position[1])throw new x('unable to parse tooltip position "center center"');if(e)for(var r=i.classList.length-1;0<=r;r--){var a=i.classList.item(r);"psv-tooltip"!==a&&"psv-tooltip--visible"!==a&&i.classList.remove(a)}else i.className="psv-tooltip";t.className&&S.addClasses(i,t.className),o.innerHTML=t.content,i.style.top="0px",i.style.left="0px";var h=i.getBoundingClientRect(),p={posClass:t.position.slice(),width:h.right-h.left,height:h.bottom-h.top,top:0,left:0,arrow_top:0,arrow_left:0};this._computeTooltipPosition(p,t);var c=!1;p.topthis.psv.prop.size.height-this.config.offset&&(p.posClass[0]="top",c=!0),p.leftthis.psv.prop.size.width-this.config.offset&&(p.posClass[1]="left",c=!0),c&&this._computeTooltipPosition(p,t),i.style.top=p.top+"px",i.style.left=p.left+"px",n.style.top=p.arrow_top+"px",n.style.left=p.arrow_left+"px",i.classList.add("psv-tooltip--"+p.posClass.join("-")),e||(this.prop.timeout=window.setTimeout(function(){i.classList.add("psv-tooltip--visible"),this.prop.timeout=null,this.psv.trigger("show-tooltip")}.bind(this),this.config.delay))},f.prototype.hideTooltip=function(){this.prop.timeout&&(window.clearTimeout(this.prop.timeout),this.prop.timeout=null),this.isTooltipVisible()&&(this.container.classList.remove("psv-tooltip--visible"),this.prop.timeout=window.setTimeout(function(){this.content.innerHTML=null,this.container.style.top="-1000px",this.container.style.left="-1000px",this.prop.timeout=null}.bind(this),this.config.delay),this.psv.trigger("hide-tooltip"))},f.prototype._computeTooltipPosition=function(t,e){var i=!1;switch(t.posClass[0]){case"bottom":t.top=e.top+e.box.height+this.config.offset+this.config.arrow_size,t.arrow_top=2*-this.config.arrow_size,i=!0;break;case"center":t.top=e.top+e.box.height/2-t.height/2,t.arrow_top=t.height/2-this.config.arrow_size;break;case"top":t.top=e.top-t.height-this.config.offset-this.config.arrow_size,t.arrow_top=t.height,i=!0}switch(t.posClass[1]){case"right":t.arrow_left=i?(t.left=e.left+e.box.width/2-this.config.offset-this.config.arrow_size,this.config.offset):(t.left=e.left+e.box.width+this.config.offset+this.config.arrow_size,2*-this.config.arrow_size);break;case"center":t.left=e.left+e.box.width/2-t.width/2,t.arrow_left=t.width/2-this.config.arrow_size;break;case"left":t.arrow_left=i?(t.left=e.left-t.width+e.box.width/2+this.config.offset+this.config.arrow_size,t.width-this.config.offset-2*this.config.arrow_size):(t.left=e.left-t.width-this.config.offset-this.config.arrow_size,t.width)}},((g.prototype=Object.create(n.prototype)).constructor=g).id=null,g.icon=null,g.iconActive=null,g.prototype.create=function(){n.prototype.create.call(this),this.constructor.icon&&this._setIcon(this.constructor.icon),this.id&&this.psv.config.lang[this.id]&&(this.container.title=this.psv.config.lang[this.id]),this.container.addEventListener("click",function(t){this.enabled&&this._onClick(),t.stopPropagation()}.bind(this));var t=this.supported();"function"==typeof t.then?(this.hide(),t.then(function(t){t&&this.show()}.bind(this))):t||this.hide()},g.prototype.destroy=function(){n.prototype.destroy.call(this)},g.prototype.supported=function(){return!0},g.prototype.toggleActive=function(t){S.toggleClass(this.container,"psv-button--active",t),this.constructor.iconActive&&this._setIcon(t?this.constructor.iconActive:this.constructor.icon)},g.prototype.disable=function(){this.container.classList.add("psv-button--disabled"),this.enabled=!1},g.prototype.enable=function(){this.container.classList.remove("psv-button--disabled"),this.enabled=!0},g.prototype._setIcon=function(t,e){e||(e=this.container),t?(e.innerHTML=d.ICONS[t],e.querySelector("svg").setAttribute("class","psv-button-svg")):e.innerHTML=""},g.prototype._onClick=function(){},((i.prototype=Object.create(g.prototype)).constructor=i).id="autorotate",i.className="psv-button psv-button--hover-scale psv-autorotate-button",i.icon="play.svg",i.iconActive="play-active.svg",i.prototype.create=function(){g.prototype.create.call(this),this.psv.on("autorotate",this)},i.prototype.destroy=function(){this.psv.off("autorotate",this),g.prototype.destroy.call(this)},i.prototype.handleEvent=function(t){switch(t.type){case"autorotate":this.toggleActive(t.args[0])}},i.prototype._onClick=function(){this.psv.toggleAutorotate()},((m.prototype=Object.create(g.prototype)).constructor=m).id="markers",m.className="psv-button psv-button--hover-scale psv-caption-button",m.icon="info.svg",m.prototype.create=function(){g.prototype.create.call(this),this.psv.on("hide-notification",this)},m.prototype.destroy=function(){this.psv.off("hide-notification",this),g.prototype.destroy.call(this)},m.prototype.handleEvent=function(t){switch(t.type){case"hide-notification":this.toggleActive(!1)}},m.prototype._onClick=function(){this.psv.isNotificationVisible()?this.psv.hideNotification():(this.psv.showNotification(this.parent.prop.caption),this.toggleActive(!0))},((v.prototype=Object.create(g.prototype)).constructor=v).className="psv-button psv-custom-button",v.prototype.create=function(){g.prototype.create.call(this),this.config.className&&S.addClasses(this.container,this.config.className),this.config.title&&(this.container.title=this.config.title),this.config.content&&(this.container.innerHTML=this.config.content),!1!==this.config.enabled&&!0!==this.config.disabled||this.disable(),!1!==this.config.visible&&!0!==this.config.hidden||this.hide()},v.prototype.destroy=function(){delete this.config,g.prototype.destroy.call(this)},v.prototype._onClick=function(){this.config.onClick&&this.config.onClick.apply(this.psv)},((y.prototype=Object.create(g.prototype)).constructor=y).id="download",y.className="psv-button psv-button--hover-scale psv-download-button",y.icon="download.svg",y.prototype._onClick=function(){var t=document.createElement("a");t.href=this.psv.config.panorama,t.download=this.psv.config.panorama,this.psv.container.appendChild(t),t.click()},((_.prototype=Object.create(g.prototype)).constructor=_).id="fullscreen",_.className="psv-button psv-button--hover-scale psv-fullscreen-button",_.icon="fullscreen-in.svg",_.iconActive="fullscreen-out.svg",_.prototype.create=function(){g.prototype.create.call(this),this.psv.on("fullscreen-updated",this)},_.prototype.destroy=function(){this.psv.off("fullscreen-updated",this),g.prototype.destroy.call(this)},_.prototype.supported=function(){return!!d.SYSTEM.fullscreenEvent},_.prototype.handleEvent=function(t){switch(t.type){case"fullscreen-updated":this.toggleActive(t.args[0])}},_.prototype._onClick=function(){this.psv.toggleFullscreen()},((w.prototype=Object.create(g.prototype)).constructor=w).id="gyroscope",w.className="psv-button psv-button--hover-scale psv-gyroscope-button",w.icon="compass.svg",w.prototype.create=function(){g.prototype.create.call(this),this.psv.on("gyroscope-updated",this)},w.prototype.destroy=function(){this.psv.off("gyroscope-updated",this),g.prototype.destroy.call(this)},w.prototype.supported=function(){return!!S.checkTHREE("DeviceOrientationControls")&&d.SYSTEM.deviceOrientationSupported},w.prototype.handleEvent=function(t){switch(t.type){case"gyroscope-updated":this.toggleActive(t.args[0])}},w.prototype._onClick=function(){this.psv.toggleGyroscopeControl()},((b.prototype=Object.create(g.prototype)).constructor=b).id="markers",b.className="psv-button psv-button--hover-scale psv-markers-button",b.icon="pin.svg",b.prototype._onClick=function(){this.psv.hud.toggleMarkersList()},((E.prototype=Object.create(g.prototype)).constructor=E).id="stereo",E.className="psv-button psv-button--hover-scale psv-stereo-button",E.icon="stereo.svg",E.prototype.create=function(){g.prototype.create.call(this),this.psv.on("stereo-updated",this)},E.prototype.destroy=function(){this.psv.off("stereo-updated",this),g.prototype.destroy.call(this)},E.prototype.supported=function(){return!(!d.SYSTEM.fullscreenEvent||!S.checkTHREE("DeviceOrientationControls"))&&d.SYSTEM.deviceOrientationSupported},E.prototype.handleEvent=function(t){switch(t.type){case"stereo-updated":this.toggleActive(t.args[0])}},E.prototype._onClick=function(){this.psv.toggleStereoView()},((M.prototype=Object.create(g.prototype)).constructor=M).id="zoom",M.className="psv-button psv-zoom-button",M.prototype.create=function(){g.prototype.create.call(this);var t=document.createElement("div");t.className="psv-zoom-button-minus",t.title=this.psv.config.lang.zoomOut,this._setIcon("zoom-out.svg",t),this.container.appendChild(t);var e=document.createElement("div");e.className="psv-zoom-button-range",this.container.appendChild(e),this.zoom_range=document.createElement("div"),this.zoom_range.className="psv-zoom-button-line",e.appendChild(this.zoom_range),this.zoom_value=document.createElement("div"),this.zoom_value.className="psv-zoom-button-handle",this.zoom_range.appendChild(this.zoom_value);var i=document.createElement("div");i.className="psv-zoom-button-plus",i.title=this.psv.config.lang.zoomIn,this._setIcon("zoom-in.svg",i),this.container.appendChild(i),this.zoom_range.addEventListener("mousedown",this),this.zoom_range.addEventListener("touchstart",this),this.psv.container.addEventListener("mousemove",this),this.psv.container.addEventListener("touchmove",this),this.psv.container.addEventListener("mouseup",this),this.psv.container.addEventListener("touchend",this),t.addEventListener("mousedown",this._zoomOut.bind(this)),i.addEventListener("mousedown",this._zoomIn.bind(this)),this.psv.on("zoom-updated",this),this.psv.once("ready",function(){this._moveZoomValue(this.psv.prop.zoom_lvl)}.bind(this))},M.prototype.destroy=function(){this._stopZoomChange(),this.psv.container.removeEventListener("mousemove",this),this.psv.container.removeEventListener("touchmove",this),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),delete this.zoom_range,delete this.zoom_value,this.psv.off("zoom-updated",this),g.prototype.destroy.call(this)},M.prototype.handleEvent=function(t){switch(t.type){case"mousedown":this._initZoomChangeWithMouse(t);break;case"touchstart":this._initZoomChangeByTouch(t);break;case"mousemove":this._changeZoomWithMouse(t);break;case"touchmove":this._changeZoomByTouch(t);break;case"mouseup":case"touchend":this._stopZoomChange(t);break;case"zoom-updated":this._moveZoomValue(t.args[0])}},M.prototype._moveZoomValue=function(t){this.zoom_value.style.left=t/100*this.zoom_range.offsetWidth-this.zoom_value.offsetWidth/2+"px"},M.prototype._initZoomChangeWithMouse=function(t){this.enabled&&(this.prop.mousedown=!0,this._changeZoom(t.clientX))},M.prototype._initZoomChangeByTouch=function(t){this.enabled&&(this.prop.mousedown=!0,this._changeZoom(t.changedTouches[0].clientX))},M.prototype._zoomIn=function(){this.enabled&&(this.prop.buttondown=!0,this.psv.zoomIn(),this.prop.longPressTimeout=window.setTimeout(this._startLongPressInterval.bind(this,1),200))},M.prototype._zoomOut=function(){this.enabled&&(this.prop.buttondown=!0,this.psv.zoomOut(),this.prop.longPressTimeout=window.setTimeout(this._startLongPressInterval.bind(this,-1),200))},M.prototype._startLongPressInterval=function(t){this.prop.buttondown&&(this.prop.longPressInterval=window.setInterval(function(){this.psv.zoom(this.psv.prop.zoom_lvl+t)}.bind(this),50))},M.prototype._stopZoomChange=function(){this.enabled&&(window.clearInterval(this.prop.longPressInterval),window.clearTimeout(this.prop.longPressTimeout),this.prop.longPressInterval=null,this.prop.mousedown=!1,this.prop.buttondown=!1)},M.prototype._changeZoomWithMouse=function(t){this.enabled&&(t.preventDefault(),this._changeZoom(t.clientX))},M.prototype._changeZoomByTouch=function(t){this.enabled&&this._changeZoom(t.changedTouches[0].clientX)},M.prototype._changeZoom=function(t){if(this.prop.mousedown){var e=(parseInt(t)-this.zoom_range.getBoundingClientRect().left)/this.zoom_range.offsetWidth*100;this.psv.zoom(e)}},(x.prototype=Object.create(Error.prototype)).name="PSVError",d.Error=x.prototype.constructor=x,k.types=["image","html","polygon_px","polygon_rad","polyline_px","polyline_rad","rect","circle","ellipse","path"],k.getType=function(e,t){var i=[];if(k.types.forEach(function(t){e[t]&&i.push(t)}),0===i.length&&!t)throw new x("missing marker content, either "+k.types.join(", "));if(1(.*)"))?i[1]:null!==(i=t.match("GPano:"+e+'="(.*?)"'))?i[1]:null},S.isFullscreenEnabled=function(t){return(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)===t},S.requestFullscreen=function(t){(t.requestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen||t.msRequestFullscreen).call(t)},S.exitFullscreen=function(){(document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen).call(document)},S.getStyle=function(t,e){return window.getComputedStyle(t,null)[e]},S.getShortestArc=function(i,o){return[0,S.TwoPI,-S.TwoPI].reduce(function(t,e){return e=o-i+e,Math.abs(e) form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); wpcf7.setStatus($form, 'init'); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } wpcf7.resetCounter($form); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; switch(data.status){ case 'init': wpcf7.setStatus($form, 'init'); break; case 'validation_failed': $.each(data.invalid_fields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('.wpcf7-form-control', this).attr('aria-describedby', n.error_id ); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); wpcf7.setStatus($form, 'invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': wpcf7.setStatus($form, 'unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': wpcf7.setStatus($form, 'spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': wpcf7.setStatus($form, 'aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': wpcf7.setStatus($form, 'sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': wpcf7.setStatus($form, 'failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: wpcf7.setStatus($form, 'custom-' + data.status.replace(/[^0-9a-z]+/i, '-') ); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); wpcf7.resetCounter($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $('.wpcf7-response-output', $form) .html('').append(data.message).slideDown('fast'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $('[role="status"]', $response).html(data.message); if(data.invalid_fields){ $.each(data.invalid_fields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $li.attr('id', n.error_id); $('ul', $response).append($li); }); }}); if(data.posted_data_hash){ $form.find('input[name="_wpcf7_posted_data_hash"]').first() .val(data.posted_data_hash); }}; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $(target).get(0).dispatchEvent(event); }; wpcf7.setStatus=function(form, status){ var $form=$(form); var prevStatus=$form.attr('data-status'); $form.data('status', status); $form.addClass(status); $form.attr('data-status', status); if(prevStatus&&prevStatus!==status){ $form.removeClass(prevStatus); }} wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.resetCounter=function(form){ var $form=$(form); $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('').attr({ 'class': 'wpcf7-not-valid-tip', 'aria-hidden': 'true', }).text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.siblings('.screen-reader-response').each(function(){ $('[role="status"]', this).html(''); $('ul', this).html(''); }); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form).hide().empty(); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); function getQueryVariable(variable){ var query=window.location.search.substring(1); var vars=query.split("&"); for (var i=0;i', '"': '"', ''': "'", '’': "’", '‘': "‘", '–': "–", '—': "—", '…': "…", '”': '”' }; return string.replace(/\&[\w\d\#]{2,5}\;/g, function (m){ return map[m]; }); }; this.init(); } wpcf7_redirect=new Wpcf7_redirect(); })(jQuery); (function(){ document.addEventListener('DOMContentLoaded', function(event){ wpcf7_recaptcha.execute=function(action){ grecaptcha.execute(wpcf7_recaptcha.sitekey, { action: action } ).then(function(token){ var event=new CustomEvent('wpcf7grecaptchaexecuted', { detail: { action: action, token: token, }, }); document.dispatchEvent(event); }); }; wpcf7_recaptcha.execute_on_homepage=function(){ wpcf7_recaptcha.execute(wpcf7_recaptcha.actions[ 'homepage' ]); }; wpcf7_recaptcha.execute_on_contactform=function(){ wpcf7_recaptcha.execute(wpcf7_recaptcha.actions[ 'contactform' ]); }; grecaptcha.ready(wpcf7_recaptcha.execute_on_homepage ); document.addEventListener('change', wpcf7_recaptcha.execute_on_contactform ); document.addEventListener('wpcf7submit', wpcf7_recaptcha.execute_on_homepage ); }); document.addEventListener('wpcf7grecaptchaexecuted', function(event){ var fields=document.querySelectorAll("form.wpcf7-form input[name='_wpcf7_recaptcha_response']" ); for(var i=0; i < fields.length; i++){ var field=fields[ i ]; field.setAttribute('value', event.detail.token); }}); })(); var kavaResponsiveMenu=function kavaResponsiveMenu(){ var options=arguments.length > 0&&arguments[0]!==undefined ? arguments[0]:{}; var defaults={ wrapper: '.main-navigation', menu: '.menu', threshold: 640, mobileMenuClass: 'mobile-menu', mobileMenuOpenClass: 'mobile-menu-open', mobileMenuToggleButtonClass: 'mobile-menu-toggle-button', toggleButtonTemplate: '' }; if(typeof Object.assign!=='function'){ options=jQuery.extend({}, defaults, options); }else{ options=Object.assign(defaults, options); } var wrapper=options.wrapper.nodeType ? options.wrapper : document.querySelector(options.wrapper); var menu=options.menu.nodeType ? options.menu : document.querySelector(options.menu); var toggleButton, toggleButtonOpenBlock, toggleButtonCloseBlock, isMobileMenu, isMobileMenuOpen; var init=[ addToggleButton, checkScreenWidth, addResizeHandler ]; if(wrapper&&menu){ runSeries(init); } function addToggleButton(){ toggleButton=document.createElement('button'); toggleButton.innerHTML=options.toggleButtonTemplate.trim(); toggleButton.className=options.mobileMenuToggleButtonClass; wrapper.insertBefore(toggleButton, wrapper.children[0]); toggleButtonOpenBlock=toggleButton.querySelector('.mobile-menu-open'); toggleButtonCloseBlock=toggleButton.querySelector('.mobile-menu-close'); toggleButton.addEventListener('click', mobileMenuToggle); } function switchToMobileMenu(){ wrapper.classList.add(options.mobileMenuClass); toggleButton.style.display="block"; isMobileMenuOpen=false; hideMenu(); } function switchToDesktopMenu(){ wrapper.classList.remove(options.mobileMenuClass); toggleButton.style.display="none"; showMenu(); } function mobileMenuToggle(){ if(isMobileMenuOpen){ hideMenu(); }else{ showMenu(); } isMobileMenuOpen = !isMobileMenuOpen; } function hideMenu(){ wrapper.classList.remove(options.mobileMenuOpenClass); menu.style.display="none"; toggleButtonOpenBlock.style.display="none"; toggleButtonCloseBlock.style.display="block"; } function showMenu(){ wrapper.classList.add(options.mobileMenuOpenClass); menu.style.display="block"; toggleButtonOpenBlock.style.display="block"; toggleButtonCloseBlock.style.display="none"; } function checkScreenWidth(){ var currentMobileMenuStatus=window.innerWidth < options.threshold ? true:false; if(isMobileMenu!==currentMobileMenuStatus){ isMobileMenu=currentMobileMenuStatus; isMobileMenu ? switchToMobileMenu():switchToDesktopMenu(); }} function addResizeHandler(){ window.addEventListener('resize', resizeHandler); } function resizeHandler(){ window.requestAnimationFrame(checkScreenWidth) } function runSeries(functions){ functions.forEach(function(func){ return func(); }); }}; var Kava_Theme_JS; (function($){ 'use strict'; Kava_Theme_JS={ init: function(){ this.page_preloader_init(); this.toTopInit(); this.responsiveMenuInit(); this.magnificPopupInit(); this.swiperInit(); }, page_preloader_init: function(){ var $pleloader=$('.page-preloader-cover'); if($pleloader[0]){ $pleloader.delay(500).fadeTo(500, 0, function(){ $(this).remove(); }); }}, toTopInit: function(){ if(undefined===window.kavaConfig.toTop||! window.kavaConfig.toTop){ return; } this.toTop(); }, toTop: function(options){ var defaults={ buttonID: 'toTop', min: 200, inDelay: 600, outDelay: 400, scrollSpeed: 600, easingType: 'linear' }, settings=$.extend(defaults, options), buttonSelector='#' + settings.buttonID; $('body').append('
    '); $(buttonSelector).hide().on('click.KavaThemeToTop', function(){ $('html, body').animate({ scrollTop: 0 }, settings.scrollSpeed, settings.easingType); return false; }); $(window).scroll(function(){ var scrollTop=$(window).scrollTop(); if(scrollTop > settings.min) $(buttonSelector).fadeIn(settings.inDelay); else $(buttonSelector).fadeOut(settings.outDelay); }); }, responsiveMenuInit: function(){ if(typeof kavaResponsiveMenu!=='undefined'){ kavaResponsiveMenu(); }}, magnificPopupInit: function(){ if(typeof $.magnificPopup!=='undefined'){ $('[data-popup="magnificPopup"]').magnificPopup({ type: 'image' }); }}, swiperInit: function(){ if(typeof Swiper!=='undefined'){ var mySwiper=new Swiper('.swiper-container', { loop: true, spaceBetween: 10, autoHeight: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' }}) }} }; Kava_Theme_JS.init(); }(jQuery)); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;onon&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;iparseInt(this.max)&&On(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ae,extend:A,mergeOptions:De,defineReactive:xe},e.set=ke,e.delete=Ae,e.nextTick=Ye,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),M.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,A(e.options.components,Tn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),Cn(e),function(e){M.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:te}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Tt}),wn.version="2.6.11";var En=p("style,class"),Nn=p("input,textarea,option,select,progress"),jn=function(e,t,n){return"value"===n&&Nn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Dn=p("contenteditable,draggable,spellcheck"),Ln=p("events,caret,typing,plaintext-only"),Mn=function(e,t){return Hn(t)||"false"===t?"false":"contenteditable"===e&&Ln(t)?t:"true"},In=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",Pn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Rn=function(e){return Pn(e)?e.slice(6,e.length):""},Hn=function(e){return null==e||!1===e};function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Un(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Un(t,r.data));return function(e,t){if(n(e)||n(t))return zn(e,Vn(t));return""}(t.staticClass,t.class)}function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function zn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i-1?hr(e,t,n):In(t)?Hn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Dn(t)?e.setAttribute(t,Mn(t,n)):Pn(t)?Hn(n)?e.removeAttributeNS(Fn,Rn(t)):e.setAttributeNS(Fn,t,n):hr(e,t,n)}function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:dr,update:dr};function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=Bn(r),c=i._transitionClasses;n(c)&&(s=zn(s,Vn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var gr,_r,br,$r,wr,Cr,xr={create:yr,update:yr},kr=/[\w).+\-_$\]]/;function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r=0&&" "===(h=e.charAt(v));v--);h&&kr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:e.slice(0,$r),key:'"'+e.slice($r+1)+'"'}:{exp:e,key:null};_r=e,$r=wr=Cr=0;for(;!zr();)Vr(br=Ur())?Jr(br):91===br&&Kr(br);return{exp:e.slice(0,wr),key:e.slice(wr+1,Cr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Ur(){return _r.charCodeAt(++$r)}function zr(){return $r>=gr}function Vr(e){return 34===e||39===e}function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91===e&&t++,93===e&&t--,0===t){Cr=$r;break}}function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}var qr,Wr="__r",Zr="__c";function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,arguments)&&Qr(e,i,n,r)}}var Xr=Ve&&!(X&&Number(X[1])<=53);function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}qr.addEventListener(e,t,Q?{capture:n,passive:r}:n)}function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};qr=r.elm,function(e){if(n(e[Wr])){var t=q?"change":"input";e[t]=[].concat(e[Wr],e[t]||[]),delete e[Wr]}n(e[Zr])&&(e.change=[].concat(e[Zr],e.change||[]),delete e[Zr])}(i),rt(i,o,Yr,Qr,Gr,r.context),qr=void 0}}var ti,ni={create:ei,update:ei};function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=A({},c)),s)i in c||(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=o;var u=t(o)?"":String(o);ii(a,u)&&(a.value=u)}else if("innerHTML"===i&&qn(a.tagName)&&t(a.innerHTML)){(ti=ti||document.createElement("div")).innerHTML=""+o+"";for(var l=ti.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(o!==s[i])try{a[i]=o}catch(e){}}}}function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.number)return f(r)!==f(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var oi={create:ri,update:ri},ai=g(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}var ui,li=/^--/,fi=/\s*!important$/,pi=function(e,t,n){if(li.test(t))e.style.setProperty(t,n);else if(fi.test(n))e.style.setProperty(C(t),n.replace(fi,""),"important");else{var r=vi(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(yi).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(yi).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A(t,$i(e.name||"v")),A(t,e),t}return"string"==typeof e?$i(e):void 0}}var $i=g(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),wi=z&&!W,Ci="transition",xi="animation",ki="transition",Ai="transitionend",Oi="animation",Si="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ki="WebkitTransition",Ai="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Oi="WebkitAnimation",Si="webkitAnimationEnd"));var Ti=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ei(e){Ti(function(){Ti(e)})}function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),gi(e,t))}function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ci?Ai:Si,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ci,l=a,f=o.length):t===xi?u>0&&(n=xi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ci:xi:null)?n===Ci?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ci&&Li.test(r[ki+"Property"])}}function Ii(e,t){for(;e.length1}function Ui(e,t){!0!==t.data.show&&Pi(t)}var zi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;ov?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(r,p,v)}(p,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(p,""),_(p,null,y,0,y.length-1,o)):n(h)?$(h,0,h.length-1):n(e.text)&&u.setTextContent(p,""):e.text!==i.text&&u.setTextContent(p,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o-1,a.selected!==o&&(a.selected=o);else if(N(Wi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function qi(e,t){return t.every(function(t){return!N(t,e)})}function Wi(e){return"_value"in e?e._value:e.value}function Zi(e){e.target.composing=!0}function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"input"))}function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Yi(e.componentInstance._vnode)}var Qi={model:Vi,show:{bind:function(e,t,n){var r=t.value,i=(n=Yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Pi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Yi(n)).data&&n.data.transition?(n.data.show=!0,r?Pi(n,function(){e.style.display=e.__vOriginalDisplay}):Ri(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},eo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?to(zt(t.children)):e}function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var io=function(e){return e.tag||Ut(e)},oo=function(e){return"show"===e.name},ao={name:"transition",props:eo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(io)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=to(o);if(!a)return o;if(this._leaving)return ro(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=no(this),u=this._vnode,l=to(u);if(a.data.directives&&a.data.directives.some(oo)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!Ut(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,it(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),ro(e,o);if("in-out"===r){if(Ut(a))return u;var p,d=function(){p()};it(c,"afterEnter",d),it(c,"enterCancelled",d),it(f,"delayLeave",function(e){p=e})}}return o}}},so=A({tag:String,moveClass:String},eo);function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete so.mode;var fo={Transition:ao,TransitionGroup:{props:so,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=no(this),s=0;s-1?Gn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Gn[e]=/HTMLUnknownElement/.test(t.toString())},A(wn.options.directives,Qi),A(wn.options.components,fo),wn.prototype.__patch__=z?zi:S,wn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),Yt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,S,{before:function(){e._isMounted&&!e._isDestroyed&&Yt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Yt(e,"mounted")),e}(this,e=e&&z?Yn(e):void 0,t)},z&&setTimeout(function(){F.devtools&&ne&&ne.emit("init",wn)},0);var po=/\{\{((?:.|\r?\n)+?)\}\}/g,vo=/[-.*+?^${}()|[\]\/\\]/g,ho=g(function(e){var t=e[0].replace(vo,"\\$&"),n=e[1].replace(vo,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var mo={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var yo,go={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(ai(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},_o=function(e){return(yo=yo||document.createElement("div")).innerHTML=e,yo.textContent},bo=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),$o=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),wo=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Co=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xo=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ko="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+P.source+"]*",Ao="((?:"+ko+"\\:)?"+ko+")",Oo=new RegExp("^<"+Ao),So=/^\s*(\/?)>/,To=new RegExp("^<\\/"+Ao+"[^>]*>"),Eo=/^]+>/i,No=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Io=/&(?:lt|gt|quot|amp|#39);/g,Fo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Po=p("pre,textarea",!0),Ro=function(e,t){return e&&Po(e)&&"\n"===t[0]};function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[e]})}var Bo,Uo,zo,Vo,Ko,Jo,qo,Wo,Zo=/^@|^v-on:/,Go=/^v-|^@|^:|^#/,Xo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Yo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Qo=/^\(|\)$/g,ea=/^\[.*\]$/,ta=/:(.*)$/,na=/^:|^\.|^v-bind:/,ra=/\.[^.\]]+(?=[^\]]*$)/g,ia=/^v-slot(:|$)|^#/,oa=/[\r\n]/,aa=/\s+/g,sa=g(_o),ca="_empty_";function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAttrsMap:{},parent:n,children:[]}}function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t.getTagNamespace||T;t.isReservedTag;zo=Tr(t.modules,"transformNode"),Vo=Tr(t.modules,"preTransformNode"),Ko=Tr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,c=!1;function u(e){if(l(e),s||e.processed||(e=fa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&da(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(u=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&u.if&&da(u,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,u;e.children=e.children.filter(function(e){return!e.slotScope}),l(e),e.pre&&(s=!1),Jo(e.tag)&&(c=!1);for(var f=0;f]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,Do(l)||"noscript"===l||(n=n.replace(//g,"$1").replace(//g,"$1")),Ro(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(No.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v),c,c+v+3),C(v+3);continue}}if(jo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(Eo);if(m){C(m[0].length);continue}var y=e.match(To);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),Ro(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(To.test($)||Oo.test($)||No.test($)||jo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d)}d<0&&(b=e),b&&C(b.length),t.chars&&b&&t.chars(b,c-b.length,c)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(Oo);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(So))&&(r=e.match(xo)||e.match(Co));)r.start=c,C(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&wo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:Bo,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,l,f){var p=r&&r.ns||Wo(e);q&&"svg"===p&&(o=function(e){for(var t=[],n=0;nc&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=Ar(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Mr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Ir(e,"value")||"null";Er(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Mr(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Wr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Br(t,l);c&&(f="if($event.target.composing)return;"+f),Er(e,"value","("+t+")"),Mr(e,u,f,null,!0),(s||a)&&Mr(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Hr(e,r,i),!1;return!0},text:function(e,t){t.value&&Er(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Er(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:bo,mustUseProp:jn,canBeLeftOpenTag:$o,isReservedTag:Wn,getTagNamespace:Zn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ba)},xa=g(function(e){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||d(e.tag)||!wa(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every($a)))}(t);if(1===t.type){if(!wa(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,Oa=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ea={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Na=function(e){return"if("+e+")return null;"},ja={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Na("$event.target!==$event.currentTarget"),ctrl:Na("!$event.ctrlKey"),shift:Na("!$event.shiftKey"),alt:Na("!$event.altKey"),meta:Na("!$event.metaKey"),left:Na("'button' in $event&&$event.button!==0"),middle:Na("'button' in $event&&$event.button!==1"),right:Na("'button' in $event&&$event.button!==2")};function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=La(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return La(e)}).join(",")+"]";var t=Sa.test(e.value),n=Aa.test(e.value),r=Sa.test(e.value.replace(Oa,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ja[s])o+=ja[s],Ta[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Na(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ma).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=Ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ia={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},Fa=function(e){this.options=e,this.warn=e.warn||Sr,this.transforms=Tr(e.modules,"transformCode"),this.dataGenFns=Tr(e.modules,"genData"),this.directives=A(A({},Ia),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?Ra(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ha(e,t);if(e.once&&!e.onceProcessed)return Ba(e,t);if(e.for&&!e.forProcessed)return za(e,t);if(e.if&&!e.ifProcessed)return Ua(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=qa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ga((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:b(e.name),value:e.value,dynamic:e.dynamic}})):null,a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:qa(t,n,!0);return"_c("+e+","+Va(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Va(e,t));var i=e.inlineTemplate?null:qa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=Pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ga(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ua(e,t,Ja,"null");if(e.for&&!e.forProcessed)return za(e,t,Ja);var r=e.slotScope===ca?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(qa(e,t)||"undefined")+":undefined":qa(e,t)||"undefined":Ra(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Ra)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r':'
    ',ts.innerHTML.indexOf(" ")>0}var os=!!z&&is(!1),as=!!z&&is(!0),ss=g(function(e){var t=Yn(e);return t&&t.innerHTML}),cs=wn.prototype.$mount;return wn.prototype.$mount=function(e,t){if((e=e&&Yn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ss(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=rs(r,{outputSourceRange:!1,shouldDecodeNewlines:os,shouldDecodeNewlinesForHref:as,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return cs.call(this,e,t)},wn.compile=rs,wn}); (function($){ 'use strict'; var JetMenuPlugin=function(element, options){ this.defaultSettings={ enabled: false, mouseLeaveDelay: 500, openSubType: 'click', ajaxLoad: true, megaWidthType: 'container', megaWidthSelector: '', mainMenuSelector: '.jet-menu', menuItemSelector: '.jet-menu-item', moreMenuContent: '···' } this.settings=$.extend(this.defaultSettings, options); this.$window=$(window); this.$document=$(document); this.$element=$(element); this.$instance=$(this.settings.mainMenuSelector, this.$element).addClass('jet-responsive-menu'); this.$menuItems=$('>' + this.settings.menuItemSelector, this.$instance).addClass('jet-responsive-menu-item'); this.$moreItemsInstance=null; this.hiddenItemsArray=[]; this.createMenuInstance(); this.$instance.trigger('jetMenuCreated'); return this; } JetMenuPlugin.prototype={ constructor: JetMenuPlugin, self: this, createMenuInstance: function(){ var self=this, mainMenuWidth, totalVisibleItemsWidth=0; this.subMenuRebuild(); this.subMegaMenuRebuild(); if(! tools.isEmpty(this.settings.moreMenuContent)&&self.settings.enabled){ self.$instance.append(''); self.$moreItemsInstance=$('> .jet-responsive-menu-available-items', this.$instance); self.$moreItemsInstance.attr({ 'hidden': 'hidden' }); } this.rebuildItems(); this.$instance.trigger('rebuildItems'); this.subMenuHandler(); this.watch(); }, subMenuHandler: function(){ var self=this, transitionend='transitionend oTransitionEnd webkitTransitionEnd', prevClickedItem=null, menuItem, menuItemParents, timer; switch(this.settings.openSubType){ case 'hover': this.$instance.on('mouseenter', '.jet-menu-item > a', { instance: this }, mouseEnterHandler); this.$instance.on('mouseleave', '.jet-menu-item > a', mouseLeaveHandler); break; case 'click': this.$instance.on('click', '.jet-menu-item > a', { instance: this }, clickHandler); break; } this.$instance.on('mouseenter', '.jet-sub-menu, .jet-sub-mega-menu', mouseEnterSubMenuHandler); this.$instance.on('mouseenter', mouseEnterInstanceHandler); this.$instance.on('mouseleave', mouseLeaveInstanceHandler); function clickHandler(event){ var $this, $siblingsItems, $link, $currentTarget, subMenu, templateId, instance=event.data.instance; event.preventDefault(); event.stopPropagation(); $currentTarget=$(event.currentTarget); $this=$currentTarget.closest('.jet-menu-item'); $siblingsItems=$this.siblings('.jet-menu-item.jet-menu-item-has-children'); $link=$('> a', $this); subMenu=$('.jet-sub-menu:first, .jet-sub-mega-menu', $this); templateId=subMenu.data('template-id')||false; if($siblingsItems[0]){ $siblingsItems.removeClass('jet-menu-hover'); $('jet-menu-item-has-children', $siblingsItems).removeClass('jet-menu-hover'); } if(! $('.jet-sub-menu, .jet-sub-mega-menu', $this)[0]||$this.hasClass('jet-menu-hover')){ window.location=$link.attr('href'); return false; } if(subMenu[0]){ $this.addClass('jet-menu-hover'); if(templateId){ instance.maybeTemplateLoad(templateId, subMenu); }} } function mouseEnterHandler(event){ var subMenu, templateId, instance; menuItem=$(event.target).parents('.jet-menu-item'); subMenu=menuItem.children('.jet-sub-menu, .jet-sub-mega-menu').first(); templateId=subMenu.data('template-id')||false; instance=event.data.instance; $('.jet-menu-hover', this.$instance).removeClass('jet-menu-hover'); if(subMenu[0]){ menuItem.addClass('jet-menu-hover'); if(templateId){ instance.maybeTemplateLoad(templateId, subMenu); }} } function mouseLeaveHandler(event){ } function mouseEnterSubMenuHandler(event){ clearTimeout(timer); } function mouseEnterInstanceHandler(event){ clearTimeout(timer); } function mouseLeaveInstanceHandler(event){ timer=setTimeout(function(){ $('.jet-menu-hover', this.$instance).removeClass('jet-menu-hover'); }, self.settings.mouseLeaveDelay); } var windowWidth=$(window).width(); self.$window.on('orientationchange resize', function(event){ if($(window).width()===windowWidth){ return; } windowWidth=$(window).width(); self.$instance.find('.jet-menu-item').removeClass('jet-menu-hover'); }); self.$document.on('touchend', function(event){ if($(event.target).closest('.jet-menu-item').length){ return; } self.$instance.find('.jet-menu-item').removeClass('jet-menu-hover'); }); }, maybeTemplateLoad: function(templateId, $templateContainer){ if(! this.settings.ajaxLoad){ return; } if($templateContainer.hasClass('template-loaded')){ return; } $.ajax({ type: 'GET', url: window.jetMenuPublicSettings.templateApiUrl, dataType: 'json', data: { 'id': templateId, 'dev': window.jetMenuPublicSettings.devMode }, beforeSend: function(jqXHR, ajaxSettings){ }, success: function(responce, textStatus, jqXHR){ var templateContent=responce['template_content'], templateScripts=responce['template_scripts'], templateStyles=responce['template_styles']; for(var scriptHandler in templateScripts){ jetMenu.addedAssetsPromises.push(jetMenu.loadScriptAsync(scriptHandler, templateScripts[ scriptHandler ])); } for(var styleHandler in templateStyles){ jetMenu.addedAssetsPromises.push(jetMenu.loadStyle(styleHandler, templateStyles[ styleHandler ])); } $templateContainer.addClass('template-loaded'); jetMenu.elementorContentRender($templateContainer, templateContent); }}); }, watch: function(delay){ var delay=delay||10; $(window).on('resize.jetResponsiveMenu orientationchange.jetResponsiveMenu load.jetResponsiveMenu', this.debounce(delay, this.watcher.bind(this))); this.$instance.trigger('containerResize'); }, watcher: function(event){ this.rebuildItems(); this.$instance.trigger('rebuildItems'); this.$instance.trigger('containerResize'); }, rebuildItems: function(){ if(! this.settings.enabled){ return false; } var self=this, mainMenuWidth=this.$instance.width(), correctedMenuWidth=this.$instance.width() - self.$moreItemsInstance.outerWidth(true), iterationVisibleItemsWidth=0, iterationHiddenItemsWidth=this.getVisibleItemsWidth(), visibleItemsArray=[], hiddenItemsArray=[]; self.$menuItems.each(function(){ var $this=$(this); iterationVisibleItemsWidth +=$this.outerWidth(true); if(iterationVisibleItemsWidth > correctedMenuWidth&&! tools.inArray(this, hiddenItemsArray)){ hiddenItemsArray.push(this); }else{ visibleItemsArray.push(this); }}); hiddenItemsArray.forEach(function(item){ var $item=$(item); $item.attr({ 'hidden': 'hidden' }); }); visibleItemsArray.forEach(function(item, index){ var $item=$(item); $item.removeAttr('hidden'); }); $('> .jet-sub-menu', self.$moreItemsInstance).empty(); hiddenItemsArray.forEach(function(item){ var $clone=$(item).clone(); $('.jet-sub-mega-menu', $clone).remove(); $clone.addClass('jet-sub-menu-item'); $clone.removeAttr('hidden'); $('> .top-level-link', $clone).toggleClass('top-level-link sub-level-link'); $('> .jet-sub-menu', self.$moreItemsInstance).append($clone); }); if(0==hiddenItemsArray.length){ self.$moreItemsInstance.attr({ 'hidden': 'hidden' }); self.$moreItemsInstance.addClass('jet-empty'); }else{ self.$moreItemsInstance.removeAttr('hidden'); self.$moreItemsInstance.removeClass('jet-empty'); } self.hiddenItemsArray=hiddenItemsArray; }, subMenuRebuild: function(){ var self=this, initSubMenuPosition=false; this.$instance.on('rebuildItems', function(){ var $subMenuList=$('.jet-sub-menu', self.$instance), maxWidth=self.$window.outerWidth(true), isRTL=$('body').hasClass('rtl'); if(! $subMenuList[0]){ return; } if(initSubMenuPosition){ $subMenuList.removeClass('inverse-side'); initSubMenuPosition=false; } $subMenuList.each(function(){ var $this=$(this), subMenuOffset=$this.offset().left, subMenuPos=subMenuOffset + $this.outerWidth(true); if(! isRTL){ if(subMenuPos >=maxWidth){ $this.addClass('inverse-side'); $this.find('.jet-sub-menu').addClass('inverse-side'); initSubMenuPosition=true; }else if(subMenuOffset < 0){ $this.removeClass('inverse-side'); $this.find('.jet-sub-menu').removeClass('inverse-side'); }}else{ if(subMenuOffset < 0){ $this.addClass('inverse-side'); $this.find('.jet-sub-menu').addClass('inverse-side'); initSubMenuPosition=true; }else if(subMenuPos >=maxWidth){ $this.removeClass('inverse-side'); $this.find('.jet-sub-menu').removeClass('inverse-side'); }} }); }); }, subMegaMenuRebuild: function(){ var self=this; this.$instance.on('containerResize', function(){ var $megaMenuList=$('.jet-sub-mega-menu', self.$instance), maxWidth=$('body').outerWidth(true); switch(self.settings.megaWidthType){ case 'items': var visibleItemsWidth=self.getVisibleItemsWidth(), firstOffset=$('> .jet-menu-item:first', self.$instance).position().left; $megaMenuList.css({ 'width': visibleItemsWidth + 'px', 'left': firstOffset }); break; case 'selector': var customSelector=$(self.settings.megaWidthSelector), instanceOffset=null, customSelectorOffset=null; if(customSelector[0]){ instanceOffset=self.$instance.offset().left; customSelectorOffset=customSelector.offset().left; $megaMenuList.css({ 'width': customSelector.outerWidth(), 'left': (customSelectorOffset - instanceOffset) + 'px' }); } break; } if($megaMenuList[0]){ $megaMenuList.css({ 'maxWidth': '' }); $megaMenuList.each(function(){ var $this=$(this), megaMenuOffsetLeft=$this.offset().left, megaMenuOffsetRight=megaMenuOffsetLeft + $this.outerWidth(true); if(megaMenuOffsetRight >=maxWidth){ $this.css({ 'maxWidth': maxWidth - megaMenuOffsetLeft }); }}); }}); }, getVisibleItemsWidth: function(){ var totalVisibleItemsWidth=0; this.$menuItems.each(function(){ var $this=$(this); if(! $this.hasAttr('hidden')){ totalVisibleItemsWidth +=$this.outerWidth(true); }}); return totalVisibleItemsWidth; }, mobileAndTabletcheck: function(){ var check=false; (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check=true;})(navigator.userAgent||navigator.vendor||window.opera); return check; }, debounce: function(threshold, callback){ var timeout; return function debounced($event){ function delayed(){ callback.call(this, $event); timeout=null; } if(timeout){ clearTimeout(timeout); } timeout=setTimeout(delayed, threshold); };}} var tools={ isEmpty: function(value){ return(( false===value)||(''===value)||(null===value)||(undefined===value)); }, isEmptyObject: function(value){ return(true===this.isEmpty(value))||(0===value.length); }, isString: function(value){ return(( 'string'===typeof value)||(value instanceof String)); }, isArray: function(value){ return $.isArray(value); }, inArray: function(value, array){ return($.inArray(value, array)!==-1); }}; $.fn.hasAttr=function(name){ return this.attr(name)!==undefined; }; $.fn.JetMenuPlugin=function(options){ return this.each(function(){ var $this=$(this), pluginOptions=('object'===typeof options) ? options:{}; if(! $this.data('JetMenuPlugin')){ $this.data('JetMenuPlugin', new JetMenuPlugin(this, pluginOptions)); }}); };}(jQuery)); (function($){ 'use strict'; window.jetMenu={ addedScripts: {}, addedStyles: {}, addedAssetsPromises: [], initedMobileMenuInstance: [], eventBus: new Vue(), $body: $('body'), init: function(){ this.initDesktopMenu(); this.mobileVueComponents(); this.initMobileMenu(); }, initDesktopMenu: function(){ var rollUp=false, jetMenuMouseleaveDelay=500, jetMenuMegaWidthType='container', jetMenuMegaWidthSelector='', jetMenuMegaOpenSubType='hover', jetMenuMegaAjax=false; if(window.jetMenuPublicSettings&&window.jetMenuPublicSettings.menuSettings){ rollUp=('true'===jetMenuPublicSettings.menuSettings.jetMenuRollUp) ? true:false; jetMenuMouseleaveDelay=jetMenuPublicSettings.menuSettings.jetMenuMouseleaveDelay||500; jetMenuMegaWidthType=jetMenuPublicSettings.menuSettings.jetMenuMegaWidthType||'container'; jetMenuMegaWidthSelector=jetMenuPublicSettings.menuSettings.jetMenuMegaWidthSelector||''; jetMenuMegaOpenSubType=jetMenuPublicSettings.menuSettings.jetMenuMegaOpenSubType||'hover'; jetMenuMegaAjax=('true'===jetMenuPublicSettings.menuSettings.jetMenuMegaAjax) ? true:false; } $('.jet-menu-container').JetMenuPlugin({ enabled: rollUp, mouseLeaveDelay: +jetMenuMouseleaveDelay, megaWidthType: jetMenuMegaWidthType, megaWidthSelector: jetMenuMegaWidthSelector, openSubType: jetMenuMegaOpenSubType, ajaxLoad: jetMenuMegaAjax, }); }, initMobileMenu: function(){ let mobileMenuList=$('.jet-mobile-menu-single'); if(! mobileMenuList[0]){ return false; } if('true'===window.jetMenuPublicSettings.devMode){ Vue.config.devtools=true; } mobileMenuList.each(function(){ let $this=$(this), menuInstanceId=$this.attr('id'), menuId=$this.data('menu-id')||false, menuOptions=$this.data('menu-options')||{}; jetMenu.createMobileMenuInstance(menuInstanceId, menuId, menuOptions); }); }, createMobileMenuInstance: function(menuInstanceId, menuId, menuOptions){ if(jetMenu.initedMobileMenuInstance.includes(menuInstanceId)){ return; } jetMenu.initedMobileMenuInstance.push(menuInstanceId); let mobileMenuInstance=new Vue({ el: '#' + menuInstanceId, data: { 'uniqId': menuInstanceId, 'menuOptions': menuOptions, }}); }, mobileVueComponents: function(){ Vue.component('mobilemenuitem', { template: '#mobile-menu-item-template', props: { itemDataObject: Object, depth: Number, menuOptions: Object }, data: function(){ return({ ajaxRequest: null, templateLoadStatus: false, }) }, computed: { itemClasses: function(){ let itemClasses=[ `jet-mobile-menu__item`, `jet-menu-item-${ this.itemDataObject.itemId }`, `jet-mobile-menu__item--sub-trigger-${ this.menuOptions.subTrigger||'item' }` ]; if(window.location.href===this.itemDataObject.url){ itemClasses.push('jet-mobile-menu__item--active'); } return itemClasses; }, isСhildrenDefine: function(){ return this.itemDataObject.children ? true:false; }, isTemplateDefine: function(){ return false!==this.itemDataObject.elementorTemplateId ? true:false; }, isSub: function(){ return this.isСhildrenDefine||this.isTemplateDefine ? true:false; }, isTopLevel: function(){ return 0===this.depth ? true:false; }, depthClass: function(){ return 0===this.depth ? 'mobile-top-level-link':'mobile-sub-level-link'; }, dropdownIconHtml: function(){ return ''!==this.menuOptions.dropdownIcon ? this.menuOptions.dropdownIcon:''; }, itemIconHtml: function(){ return this.itemDataObject.itemIcon; }, isIconVisible: function(){ let iconVisible=this.menuOptions['itemIconVisible']||'true'; return 'false'===iconVisible||''===this.itemDataObject.itemIcon||! this.itemDataObject.itemIcon ? false:true; }, isBadgeVisible: function(){ let badgeVisible=this.menuOptions['itemBadgeVisible']||'true'; return 'false'===badgeVisible||''===this.itemDataObject.badgeText||! this.itemDataObject.badgeText ? false:true; }, isDescVisible: function(){ let descVisible=this.menuOptions['itemDescVisible']||'false'; return 'false'===descVisible||''===this.itemDataObject.description||! this.itemDataObject.description ? false:true; }, loaderColor: function(){ return this.menuOptions.loaderColor||'#3a3a3a'; }, }, methods: { itemSubHandler: function(event){ if('item'!==this.menuOptions.subTrigger){ return; } let target=event.target, mobileLink=target.closest('.mobile-link'); if(this.isSub&&mobileLink){ event.preventDefault(); } this.switchToSub(event); }, maskerSubHandler: function(event){ if('submarker'!==this.menuOptions.subTrigger){ return; } this.switchToSub(event); }, switchToSub: function(event){ if(! this.isSub){ return; } if(! this.isTemplateDefine){ jetMenu.eventBus.$emit('itemsSubSwitch', { menuUniqId: this.menuOptions.menuUniqId, id: this.itemDataObject.id, name: this.itemDataObject.name, children: this.itemDataObject.children||false }); }else{ if(! this.itemDataObject.elementorContent){ this.getElementorTemplate(); }else{ jetMenu.eventBus.$emit('showTemplateContent', { menuUniqId: this.menuOptions.menuUniqId, id: this.itemDataObject.id, name: this.itemDataObject.name, elementorContent: this.itemDataObject.elementorContent }); }} }, getElementorTemplate: function(){ var vueInstance=this; vueInstance.ajaxRequest=$.ajax({ type: 'GET', url: window.jetMenuPublicSettings.templateApiUrl, dataType: 'json', data: { 'id': vueInstance.itemDataObject.elementorTemplateId, 'dev': window.jetMenuPublicSettings.devMode }, beforeSend: function(jqXHR, ajaxSettings){ if(null!==vueInstance.ajaxRequest){ vueInstance.ajaxRequest.abort(); } vueInstance.templateLoadStatus=true; }, success: function(responce, textStatus, jqXHR){ var templateContent=responce['template_content'], templateScripts=responce['template_scripts'], templateStyles=responce['template_styles']; for(var scriptHandler in templateScripts){ jetMenu.addedAssetsPromises.push(jetMenu.loadScriptAsync(scriptHandler, templateScripts[ scriptHandler ])); } for(var styleHandler in templateStyles){ jetMenu.addedAssetsPromises.push(jetMenu.loadStyle(styleHandler, templateStyles[ styleHandler ])); } vueInstance.templateLoadStatus=false; vueInstance.itemDataObject.elementorContent=templateContent; jetMenu.eventBus.$emit('showTemplateContent', { menuUniqId: vueInstance.menuOptions.menuUniqId, id: vueInstance.itemDataObject.id, name: vueInstance.itemDataObject.name, elementorContent: vueInstance.itemDataObject.elementorContent }); }}); }} }); Vue.component('mobilemenulist', { template: '#mobile-menu-list-template', props: { depth: Number, childrenObject: Object, menuOptions: Object }}); Vue.component('mobilemenu', { template: '#mobile-menu-template', props: { menuOptions: { type: Object, default: {}}, }, data: function(){ return({ menuOpen: false, children: false, itemsRawData: {}, trail:[], breadcrumbsData:[], animation: 'items-next-animation', ajaxRequest: null, templateVisible: false, instanceLoadStatus: false, itemTemplateContent: false, headerTemplate: this.menuOptions['headerTemplate']||0, headerContent: false, headerTemplateVisible: false, beforeTemplate: this.menuOptions['beforeTemplate']||0, beforeContent: false, afterTemplate: this.menuOptions['afterTemplate']||0, afterContent: false, ajaxPromises: [] }) }, mounted: function(){ let vueInstance=this; if(this.menuOpen){ jetMenu.$body.addClass('jet-mobile-menu-visible'); } this.ajaxPromises.push(new Promise(function(resolve, reject){ $.ajax({ type: 'GET', url: window.jetMenuPublicSettings.menuItemsApiUrl, dataType: 'json', data: { 'menu_id': vueInstance.menuId, 'dev': window.jetMenuPublicSettings.devMode }, beforeSend: function(jqXHR, ajaxSettings){ }, success: function(responce, textStatus, jqXHR){ let responceData=responce.data.items; vueInstance.itemsRawData=responceData; resolve(); }}); }) ); if(0!==+this.headerTemplate){ this.ajaxPromises.push(new Promise(function(resolve, reject){ $.ajax({ type: 'GET', url: window.jetMenuPublicSettings.templateApiUrl, dataType: 'json', data: { 'id': vueInstance.headerTemplate, 'dev': window.jetMenuPublicSettings.devMode }, success: function(responce, textStatus, jqXHR){ let templateContent=responce['template_content'], templateScripts=responce['template_scripts'], templateStyles=responce['template_styles']; for(let scriptHandler in templateScripts){ jetMenu.addedAssetsPromises.push(jetMenu.loadScriptAsync(scriptHandler, templateScripts[ scriptHandler ])); } for(let styleHandler in templateStyles){ jetMenu.addedAssetsPromises.push(jetMenu.loadStyle(styleHandler, templateStyles[ styleHandler ])); } vueInstance.headerContent=templateContent; vueInstance.headerTemplateVisible=true; resolve(); }}); }) ); } if(0!==+this.beforeTemplate){ this.ajaxPromises.push(new Promise(function(resolve, reject){ $.ajax({ type: 'GET', url: window.jetMenuPublicSettings.templateApiUrl, dataType: 'json', data: { 'id': vueInstance.beforeTemplate, 'dev': window.jetMenuPublicSettings.devMode }, success: function(responce, textStatus, jqXHR){ let templateContent=responce['template_content'], templateScripts=responce['template_scripts'], templateStyles=responce['template_styles']; for(let scriptHandler in templateScripts){ jetMenu.addedAssetsPromises.push(jetMenu.loadScriptAsync(scriptHandler, templateScripts[ scriptHandler ])); } for(let styleHandler in templateStyles){ jetMenu.addedAssetsPromises.push(jetMenu.loadStyle(styleHandler, templateStyles[ styleHandler ])); } vueInstance.beforeContent=templateContent; resolve(); }}); }) ); } if(0!==+this.afterTemplate){ this.ajaxPromises.push(new Promise(function(resolve, reject){ $.ajax({ type: 'GET', url: window.jetMenuPublicSettings.templateApiUrl, dataType: 'json', data: { 'id': vueInstance.afterTemplate, 'dev': window.jetMenuPublicSettings.devMode }, success: function(responce, textStatus, jqXHR){ let templateContent=responce['template_content'], templateScripts=responce['template_scripts'], templateStyles=responce['template_styles']; for(let scriptHandler in templateScripts){ jetMenu.addedAssetsPromises.push(jetMenu.loadScriptAsync(scriptHandler, templateScripts[ scriptHandler ])); } for(let styleHandler in templateStyles){ jetMenu.addedAssetsPromises.push(jetMenu.loadStyle(styleHandler, templateStyles[ styleHandler ])); } vueInstance.afterContent=templateContent; resolve(); }}); }) ); } this.instanceLoadStatus=true; Promise.all(this.ajaxPromises).then(function(){ vueInstance.instanceLoadStatus=false; }, function(reason){ console.log('Script Loaded Error'); }); jetMenu.eventBus.$on('itemsSubSwitch', function(payLoad){ if(vueInstance.menuOptions.menuUniqId!==payLoad.menuUniqId){ return; } vueInstance.trail.push(payLoad.children); vueInstance.children=payLoad.children; vueInstance.breadcrumbsData.push(payLoad.name); vueInstance.animation='items-next-animation'; }); jetMenu.eventBus.$on('showTemplateContent', function(payLoad){ if(vueInstance.menuOptions.menuUniqId!==payLoad.menuUniqId){ return; } vueInstance.itemTemplateContent=payLoad.elementorContent; vueInstance.templateVisible=true; vueInstance.breadcrumbsData.push(payLoad.name); vueInstance.animation='items-next-animation'; vueInstance.showTemplateContent(); }); }, computed: { instanceClass: function(){ let classes=[ `jet-mobile-menu__instance--${ this.menuOptions.menuLayout }-layout`, `${ this.menuOptions.menuPosition }-container-position`, `${ this.menuOptions.togglePosition||'default' }-toggle-position`, ]; return classes; }, menuId: function(){ if(this.menuOptions.mobileMenuId){ return this.menuOptions.mobileMenuId; } return this.menuOptions.menuId; }, coverVisible: function(){ let avaliableForLayout=[ 'slide-out' ]; return avaliableForLayout.includes(this.menuOptions.menuLayout); }, itemsList: function(){ if(! this.children){ return this.itemsRawData; } return this.children; }, isClose: function(){ let avaliableForLayout=[ 'slide-out' ]; return avaliableForLayout.includes(this.menuOptions.menuLayout); }, isBack: function(){ return this.children||this.templateVisible ? true:false; }, isBreadcrumbs: function(){ return this.menuOptions.useBreadcrumb&&0!==this.breadcrumbsData.length ? true:false; }, depth: function(){ return this.trail.length; }, containerPosition: function(){ return this.menuOptions['menuPosition']; }, showAnimation: function(){ let animation=false; switch(this.menuOptions.menuLayout){ case 'slide-out': animation='right'===this.containerPosition ? 'menu-container-left-animation':'menu-container-right-animation'; break; case 'dropdown': animation='menu-container-dropdown-animation'; break; case 'push': animation='menu-container-expand-animation'; break; } return animation; }, toggleClosedIcon: function(){ return ''!==this.menuOptions.toggleClosedIcon ? this.menuOptions.toggleClosedIcon:''; }, toggleOpenedIcon: function(){ return ''!==this.menuOptions.toggleOpenedIcon ? this.menuOptions.toggleOpenedIcon:''; }, toggleText: function(){ return ''!==this.menuOptions.toggleText ? this.menuOptions.toggleText:false; }, closeIcon: function(){ return ''!==this.menuOptions.closeIcon ? this.menuOptions.closeIcon:''; }, backIcon: function(){ let backIcon=''!==this.menuOptions.backIcon ? this.menuOptions.backIcon:'', backText=''!==this.menuOptions.backText ? `${ this.menuOptions.backText }`:'', backHtml=backIcon + backText; return backHtml; }, backText: function(){ return ''!==this.menuOptions.backText ? this.menuOptions.backText:false; }, breadcrumbIcon: function(){ return ''!==this.menuOptions.breadcrumbIcon ? this.menuOptions.breadcrumbIcon:''; }, loaderColor: function(){ return this.menuOptions.loaderColor||'#3a3a3a'; }, toggleLoaderVisible: function(){ return this.menuOptions.toggleLoader&&this.instanceLoadStatus ? true:false; }, beforeTemplateVisible: function(){ return this.beforeContent ? true:false; }, afterTemplateVisible: function(){ return this.afterContent ? true:false; }}, watch: { menuOpen: function(curr, prev){ if(curr){ jetMenu.$body.addClass('jet-mobile-menu-visible'); this.initTemplatesContent(); } if(! curr){ jetMenu.$body.removeClass('jet-mobile-menu-visible'); this.clearStates(); }} }, methods: { menuToggle: function(){ this.menuOpen = ! this.menuOpen; }, closeMenu: function(){ this.menuOpen=false; }, clearStates: function(){ this.trail=[]; this.children=false; this.breadcrumbsData=[]; this.templateVisible=false; }, goBack: function(){ this.animation='items-prev-animation'; if(! this.templateVisible){ this.$delete(this.trail, this.trail.length - 1); this.children=this.trail.slice(-1)[0]||false; }else{ this.templateVisible=false; } this.$delete(this.breadcrumbsData, this.breadcrumbsData.length - 1); }, showTemplateContent: function(){ let vueInstance=this; this.$nextTick(function(){ let $templateContainer=$(vueInstance.$refs['template-content']).find('.jet-mobile-menu__template-content'); jetMenu.elementorContentRender($templateContainer); }); }, initTemplatesContent: function(){ let vueInstance=this; this.$nextTick(function(){ if(vueInstance.headerContent){ let $headerContainer=$(vueInstance.$refs['header-template-content']); jetMenu.elementorContentRender($headerContainer); } if(vueInstance.beforeContent){ let $beforeContainer=$(vueInstance.$refs['before-template-content']); jetMenu.elementorContentRender($beforeContainer); } if(vueInstance.beforeContent){ let $afterContainer=$(vueInstance.$refs['after-template-content']); jetMenu.elementorContentRender($afterContainer); }}); }, breadcrumbHandle: function(index){ if(index===this.breadcrumbsData.length){ return; } this.animation='items-prev-animation'; this.trail=this.trail.slice(0, index); this.children=this.trail.slice(-1)[0]||false; this.templateVisible=false; this.breadcrumbsData=this.breadcrumbsData.slice(0, index); }} }); }, loadScriptAsync: function(script, uri){ if(jetMenu.addedScripts.hasOwnProperty(script)){ return script; } jetMenu.addedScripts[ script ]=uri; return new Promise(function(resolve, reject){ var tag=document.createElement('script'); tag.src=uri; tag.async=true; tag.onload=function(){ resolve(script); }; document.head.appendChild(tag); }); }, loadStyle: function(style, uri){ if(jetMenu.addedStyles.hasOwnProperty(style)&&jetMenu.addedStyles[ style ]===uri){ return style; } jetMenu.addedStyles[ style ]=uri; return new Promise(function(resolve, reject){ var tag=document.createElement('link'); tag.id=style; tag.rel='stylesheet'; tag.href=uri; tag.type='text/css'; tag.media='all'; tag.onload=function(){ resolve(style); }; document.head.appendChild(tag); }); }, elementorContentRender: function($templateContainer, templateContent){ let content=templateContent||false; Promise.all(jetMenu.addedAssetsPromises).then(function(value){ if(templateContent){ $templateContainer.html(templateContent); } jetMenu.elementorFrontendInit($templateContainer); }, function(reason){ console.log('Script Loaded Error'); }); }, elementorFrontendInit: function($templateContainer){ $templateContainer.find('div[data-element_type]').each(function(){ var $this=$(this), elementType=$this.data('element_type'); if(! elementType){ return; } try { if('widget'===elementType){ elementType=$this.data('widget_type'); if(window.elementorFrontend&&window.elementorFrontend.hooks){ window.elementorFrontend.hooks.doAction('frontend/element_ready/widget', $this, $); }} if(window.elementorFrontend&&window.elementorFrontend.hooks){ window.elementorFrontend.hooks.doAction('frontend/element_ready/' + elementType, $this, $); }} catch(err){ console.log(err); $this.remove(); return false; }}); }}; jetMenu.init(); }(jQuery));